Class: KiCad::AST::Property
Overview
Properties
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#hidden=(h = true) ⇒ Object
Set or clear (hide) on the property_node.
Methods inherited from Node
child_types, #children_of_type, #emit, #emit_compact, #emit_compacting, #initialize, to_class_name, to_symbol, value_types
Constructor Details
This class inherits a constructor from KiCad::AST::Node
Instance Method Details
#hidden=(h = true) ⇒ Object
Set or clear (hide) on the property_node
239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/kicad/ast.rb', line 239 def hidden=(h = true) v = (h ? :yes : :no) if !effects # No effects yet prop = KiCad.parse(%Q{(effects(hide #{v}))})&.value @children.append(prop) if prop elsif (existing = effects.hide) # Effects and hide already existing.hide = v else # Create new (hide) node prop = KiCad.parse(%Q{(hide #{v})})&.value @children.append(prop) if prop end end |