Class: Interscript::Node::AliasDef
- Inherits:
-
Interscript::Node
- Object
- Interscript::Node
- Interscript::Node::AliasDef
- Defined in:
- lib/interscript/node/alias_def.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#doc_name ⇒ Object
Returns the value of attribute doc_name.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, data) ⇒ AliasDef
constructor
A new instance of AliasDef.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, data) ⇒ AliasDef
Returns a new instance of AliasDef.
4 5 6 7 8 |
# File 'lib/interscript/node/alias_def.rb', line 4 def initialize(name, data) data = Interscript::Node::Item.try_convert(data) @name = name @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
2 3 4 |
# File 'lib/interscript/node/alias_def.rb', line 2 def data @data end |
#doc_name ⇒ Object
Returns the value of attribute doc_name.
2 3 4 |
# File 'lib/interscript/node/alias_def.rb', line 2 def doc_name @doc_name end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/interscript/node/alias_def.rb', line 2 def name @name end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 14 |
# File 'lib/interscript/node/alias_def.rb', line 10 def ==(other) super && self.name == other.name && self.data == other.data end |
#to_hash ⇒ Object
16 17 18 19 20 |
# File 'lib/interscript/node/alias_def.rb', line 16 def to_hash { :class => self.class.to_s, :name => @name, :data => @data.to_hash } end |