Class: Interscript::Node::Item::Stage
- Inherits:
-
Interscript::Node::Item
- Object
- Interscript::Node
- Interscript::Node::Item
- Interscript::Node::Item::Stage
- Defined in:
- lib/interscript/node/item/stage.rb,
lib/interscript/visualize/nodes.rb
Instance Attribute Summary collapse
-
#map ⇒ Object
Returns the value of attribute map.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Interscript::Node::Item
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, map: nil) ⇒ Stage
constructor
A new instance of Stage.
- #inspect ⇒ Object
- #to_hash ⇒ Object
- #to_html(doc) ⇒ Object
Methods inherited from Interscript::Node::Item
Constructor Details
#initialize(name, map: nil) ⇒ Stage
Returns a new instance of Stage.
4 5 6 7 |
# File 'lib/interscript/node/item/stage.rb', line 4 def initialize(name, map: nil) self.name = name self.map = map end |
Instance Attribute Details
#map ⇒ Object
Returns the value of attribute map.
3 4 5 |
# File 'lib/interscript/node/item/stage.rb', line 3 def map @map end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/interscript/node/item/stage.rb', line 2 def name @name end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 |
# File 'lib/interscript/node/item/stage.rb', line 16 def ==(other) super && self.name == other.name && self.map == other.map end |
#inspect ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/interscript/node/item/stage.rb', line 20 def inspect if map "map.#{@map}.stage.#{@name}" else "stage.#{@name}" end end |
#to_hash ⇒ Object
9 10 11 12 13 14 |
# File 'lib/interscript/node/item/stage.rb', line 9 def to_hash { :class => self.class.to_s, :name => name, :map => map, } end |
#to_html(doc) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/interscript/visualize/nodes.rb', line 14 def to_html(doc) if map n = doc.dep_aliases[map].full_name "stage #{name.to_s.gsub("_", " ")} from map #{n}" else "#{name.to_s.gsub("_", " ")}" end end |