Class: Geoiq::BaseModel
- Inherits:
-
Object
- Object
- Geoiq::BaseModel
- Defined in:
- lib/geoiq/base_model.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auth, options = {}) ⇒ BaseModel
constructor
A new instance of BaseModel.
Constructor Details
#initialize(auth, options = {}) ⇒ BaseModel
Returns a new instance of BaseModel.
5 6 7 |
# File 'lib/geoiq/base_model.rb', line 5 def initialize(auth, ={}) @auth = auth end |
Instance Attribute Details
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
3 4 5 |
# File 'lib/geoiq/base_model.rb', line 3 def auth @auth end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
3 4 5 |
# File 'lib/geoiq/base_model.rb', line 3 def json @json end |
Class Method Details
.api_methods(methods) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/geoiq/base_model.rb', line 11 def api_methods(methods) class_eval <<-END def api_methods #{methods.inspect} end END end |
.crud ⇒ Object
19 20 21 |
# File 'lib/geoiq/base_model.rb', line 19 def crud %w(find create update delete) end |