Class: Alma::AlmaRecord
- Inherits:
-
Object
show all
- Defined in:
- lib/alma/alma_record.rb
Instance Method Summary
collapse
Constructor Details
#initialize(record) ⇒ AlmaRecord
Returns a new instance of AlmaRecord.
5
6
7
8
|
# File 'lib/alma/alma_record.rb', line 5
def initialize(record)
@raw_record = record
post_initialize()
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
10
11
12
13
|
# File 'lib/alma/alma_record.rb', line 10
def method_missing(name)
return response[name.to_s] if response.has_key?(name.to_s)
super.method_missing name
end
|
Instance Method Details
#post_initialize ⇒ Object
23
24
25
26
|
# File 'lib/alma/alma_record.rb', line 23
def post_initialize
end
|
#respond_to_missing?(name, include_private = false) ⇒ Boolean
15
16
17
|
# File 'lib/alma/alma_record.rb', line 15
def respond_to_missing?(name, include_private = false)
response.has_key?(name.to_s) || super
end
|
#response ⇒ Object
19
20
21
|
# File 'lib/alma/alma_record.rb', line 19
def response
@raw_record
end
|