Class: FoundationApi::Service
Class Method Summary
collapse
Instance Method Summary
collapse
#[], #[]=, #method_missing
Constructor Details
#initialize(attributes = {}) ⇒ Service
52
53
54
|
# File 'lib/foundation_api/service.rb', line 52
def initialize(attributes = {})
@attributes = HashWithIndifferentAccess.new attributes
end
|
Class Method Details
.all ⇒ Object
19
20
21
22
|
# File 'lib/foundation_api/service.rb', line 19
def all
res = request_data(default_scope)
res && instantiate_objects(res)
end
|
.where(options) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/foundation_api/service.rb', line 11
def where(options)
if options.is_a? Hash
options = {:conditions => options }
end
res = request_data(translate_options(options))
res && instantiate_objects(res)
end
|