Class: FoundationApi::Service
- Inherits:
-
Object
- Object
- FoundationApi::Service
- Includes:
- Model::AttributeMethods, Request
- Defined in:
- lib/foundation_api/service.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Service
constructor
A new instance of Service.
Methods included from Model::AttributeMethods
Constructor Details
#initialize(attributes = {}) ⇒ Service
Returns a new instance of Service.
52 53 54 |
# File 'lib/foundation_api/service.rb', line 52 def initialize(attributes = {}) @attributes = HashWithIndifferentAccess.new attributes end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FoundationApi::Model::AttributeMethods
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() if .is_a? Hash = {:conditions => } end res = request_data(()) res && instantiate_objects(res) end |