Class: SnoozeForce::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/snooze_force/base.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Base

Returns a new instance of Base.



12
13
14
15
16
# File 'lib/snooze_force/base.rb', line 12

def initialize(client, options = {})
  self.client = client
  self.options = {:base => ''}.merge(options)
  self.base = self.options[:base]
end

Class Attribute Details

.sobjectObject

Returns the value of attribute sobject.



9
10
11
# File 'lib/snooze_force/base.rb', line 9

def sobject
  @sobject
end

Instance Attribute Details

#baseObject

Returns the value of attribute base.



6
7
8
# File 'lib/snooze_force/base.rb', line 6

def base
  @base
end

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/snooze_force/base.rb', line 4

def client
  @client
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/snooze_force/base.rb', line 5

def options
  @options
end

Instance Method Details

#_describeObject



25
26
27
28
29
30
# File 'lib/snooze_force/base.rb', line 25

def _describe
  unless @_describe
    @_describe = self.get('describe')
  end
  return @_describe
end

#_fieldsObject



32
33
34
# File 'lib/snooze_force/base.rb', line 32

def _fields
  self._describe['fields']
end

#_sobjectObject



36
37
38
# File 'lib/snooze_force/base.rb', line 36

def _sobject
  self.class.sobject
end