Skip to content

Commit

Permalink
Fixing some linting issues for ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
FaragElsayed2 committed Feb 8, 2023
1 parent ed6e97a commit 841448e
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions klayout/drc/rule_decks/main.drc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ end
#================================================
logger.info('Evaluate switches.')

def bool_check?(obj)
obj.to_s.downcase == 'true'
end

# connectivity rules
if $conn_drc == 'true'
CONNECTIVITY_RULES = $conn_drc
Expand All @@ -71,29 +75,17 @@ else
end

# WEDGE
WEDGE = if $wedge == 'false'
$wedge
else
'true'
end
WEDGE = bool_check?($wedge)

logger.info("Wedge enabled: #{WEDGE}")

# BALL
BALL = if $ball == 'false'
$ball
else
'true'
end
BALL = bool_check?($ball)

logger.info("Ball enabled: #{BALL}")

# GOLD
GOLD = if $gold == 'false'
$gold
else
'true'
end
GOLD = bool_check?($gold)

logger.info("Gold enabled: #{GOLD}")

Expand Down Expand Up @@ -153,22 +145,14 @@ METAL_LEVEL = $metal_level || '5LM'
logger.info("METAL_STACK Selected is #{METAL_LEVEL}")

# FEOL
if $feol == 'false'
FEOL = $feol
logger.info('FEOL is disabled.')
else
FEOL = 'true'.freeze
logger.info('FEOL is enabled.')
end
FEOL = bool_check?($feol)

logger.info("FEOL enabled: #{FEOL}")

# BEOL
if $beol == 'false'
BEOL = $beol
logger.info('BEOL is disabled.')
else
BEOL = 'true'.freeze
logger.info('BEOL is enabled.')
end
BEOL = bool_check?($beol)

logger.info("BEOL enabled: #{BEOL}")

#================================================
#------------- LAYERS DEFINITIONS ---------------
Expand Down

0 comments on commit 841448e

Please sign in to comment.