Class: ManaMana::RDSL::NodeWithOffset

Inherits:
Node
  • Object
show all
Defined in:
lib/manamana/rdsl/nodes.rb

Direct Known Subclasses

GroupNode, RequirementNode, RowNode

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #name

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, children = []) ⇒ NodeWithOffset

Returns a new instance of NodeWithOffset.



21
22
23
24
# File 'lib/manamana/rdsl/nodes.rb', line 21

def initialize(options={}, children=[])
  @offset = options[:offset] || nil
  super options, children
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



19
20
21
# File 'lib/manamana/rdsl/nodes.rb', line 19

def offset
  @offset
end

Instance Method Details

#==(other_node) ⇒ Object



26
27
28
# File 'lib/manamana/rdsl/nodes.rb', line 26

def ==(other_node)
  super(other_node) && @offset == other_node.offset
end