Class: Geoiq::BaseModel

Inherits:
Object
  • Object
show all
Defined in:
lib/geoiq/base_model.rb

Direct Known Subclasses

Analysis, Dataset, Map

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, options={})
  @auth = auth
end

Instance Attribute Details

#authObject (readonly)

Returns the value of attribute auth.



3
4
5
# File 'lib/geoiq/base_model.rb', line 3

def auth
  @auth
end

#jsonObject (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

.crudObject



19
20
21
# File 'lib/geoiq/base_model.rb', line 19

def crud
  %w(find create update delete)
end