Class: OpenStruct
- Inherits:
-
Object
- Object
- OpenStruct
- Defined in:
- lib/starwars/overrides/ostruct.rb
Overview
ostruct for ruby 1.9 doesn’t implement [] operater This a monkey patch my copying the ruby 2.0 version
Direct Known Subclasses
Instance Method Summary collapse
-
#[](name) ⇒ Object
private
Fetch an object by id or URL.
Instance Method Details
#[](name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Fetch an object by id or URL
13 14 15 |
# File 'lib/starwars/overrides/ostruct.rb', line 13 def [](name) @table[name.to_sym] end |