class Interscript::Node::Item::Stage

Attributes

map[RW]
name[RW]

Public Class Methods

new(name, map: nil) click to toggle source
# File lib/interscript/node/item/stage.rb, line 4
def initialize(name, map: nil)
  self.name = name
  self.map = map
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method Interscript::Node::Item#==
# File lib/interscript/node/item/stage.rb, line 16
def ==(other)
  super && self.name == other.name && self.map == other.map
end
inspect() click to toggle source
# File lib/interscript/node/item/stage.rb, line 20
def inspect
  if map
    "map.#{@map}.stage.#{@name}"
  else
    "stage.#{@name}"
  end
end
to_hash() click to toggle source
# 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) click to toggle source
# 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