Class: Ro::Collection::List
- Includes:
- Klass
- Defined in:
- lib/ro/collection/list.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #[](index) ⇒ Object
- #get(name) ⇒ Object
-
#initialize(root) ⇒ List
constructor
A new instance of List.
Methods included from Klass
Constructor Details
Instance Attribute Details
Instance Method Details
#[](index) ⇒ Object
17 18 19 20 |
# File 'lib/ro/collection/list.rb', line 17 def [](index, ...) return get(index) if [String, Symbol].include?(index.class) super(index, ...) end |
#get(name) ⇒ Object
13 14 15 |
# File 'lib/ro/collection/list.rb', line 13 def get(name) @root.get(name) end |