Class: RailroadDiagrams::Optional
- Inherits:
-
DiagramMultiContainer
- Object
- DiagramItem
- DiagramMultiContainer
- RailroadDiagrams::Optional
- Defined in:
- lib/railroad_diagrams/optional.rb
Instance Attribute Summary
Attributes inherited from DiagramItem
#attrs, #children, #down, #height, #needs_space, #up, #width
Class Method Summary collapse
Methods inherited from DiagramMultiContainer
#format, #initialize, #to_str, #walk
Methods inherited from DiagramItem
#add, #format, #initialize, #text_diagram, #to_str, #walk, #write_svg
Constructor Details
This class inherits a constructor from RailroadDiagrams::DiagramMultiContainer
Class Method Details
.new(item, skip = false) ⇒ Object
5 6 7 |
# File 'lib/railroad_diagrams/optional.rb', line 5 def self.new(item, skip = false) Choice.new(skip ? 0 : 1, Skip.new, item) end |