Class: Evergreen::IDLObject

Inherits:
Object
  • Object
show all
Defined in:
lib/evergreen/idl_object.rb

Overview

A base class for any object represented in Evergreen’s IDL

Direct Known Subclasses

BibRecord

Instance Method Summary collapse

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_fieldsObject



11
12
13
# File 'lib/evergreen/idl_object.rb', line 11

def idl_fields
  @idl[idl_class]
end