Class: Ixtlan::Guard::Node
- Inherits:
-
Hash
- Object
- Hash
- Ixtlan::Guard::Node
- Defined in:
- lib/ixtlan/guard/guard.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
-
#initialize(name) ⇒ Node
constructor
A new instance of Node.
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
#content ⇒ Object (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 |