Class: Ixtlan::Guard::Node

Inherits:
Hash
  • Object
show all
Defined in:
lib/ixtlan/guard/guard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Node

Returns a new instance of Node.



170
171
172
173
174
# File 'lib/ixtlan/guard/guard.rb', line 170

def initialize(name)
  map = super
  @content = {}
  merge!({ name => @content })
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



168
169
170
# File 'lib/ixtlan/guard/guard.rb', line 168

def content
  @content
end

Instance Method Details

#[](k) ⇒ Object



179
180
181
# File 'lib/ixtlan/guard/guard.rb', line 179

def [](k)
  @content[k]
end

#[]=(k, v) ⇒ Object



176
177
178
# File 'lib/ixtlan/guard/guard.rb', line 176

def []=(k,v)
  @content[k] = v
end