Class: Evergreen::IDLObject
- Inherits:
-
Object
- Object
- Evergreen::IDLObject
- Defined in:
- lib/evergreen/idl_object.rb
Overview
A base class for any object represented in Evergreen’s IDL
Direct Known Subclasses
Instance Method Summary collapse
- #get(field_name) ⇒ Object
- #idl_fields ⇒ Object
-
#initialize(idl) ⇒ IDLObject
constructor
A new instance of IDLObject.
Constructor Details
#initialize(idl) ⇒ IDLObject
Returns a new instance of IDLObject.
7 8 9 |
# File 'lib/evergreen/idl_object.rb', line 7 def initialize(idl) @idl = idl end |
Instance Method Details
#get(field_name) ⇒ Object
15 16 17 |
# File 'lib/evergreen/idl_object.rb', line 15 def get(field_name) data[idl_fields.index(field_name)] end |
#idl_fields ⇒ Object
11 12 13 |
# File 'lib/evergreen/idl_object.rb', line 11 def idl_fields @idl[idl_class] end |