Class: CapsuleCRM::CustomField

Inherits:
Child show all
Defined in:
lib/capsulecrm/custom_field.rb

Instance Attribute Summary collapse

Attributes inherited from Child

#parent

Attributes inherited from Base

#id, #raw_data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Child

init_many, init_one, #initialize

Methods inherited from Base

#==, #errors, find, #initialize, last_response, #new_record?

Constructor Details

This class inherits a constructor from CapsuleCRM::Child

Instance Attribute Details

#booleanObject

Returns the value of attribute boolean.



3
4
5
# File 'lib/capsulecrm/custom_field.rb', line 3

def boolean
  @boolean
end

#dateObject

Returns the value of attribute date.



4
5
6
# File 'lib/capsulecrm/custom_field.rb', line 4

def date
  @date
end

#labelObject

Returns the value of attribute label.



5
6
7
# File 'lib/capsulecrm/custom_field.rb', line 5

def label
  @label
end

#textObject

Returns the value of attribute text.



6
7
8
# File 'lib/capsulecrm/custom_field.rb', line 6

def text
  @text
end

Class Method Details

.xml_mapObject

nodoc



30
31
32
33
34
35
36
37
38
# File 'lib/capsulecrm/custom_field.rb', line 30

def self.xml_map
  map = {
    'label' => 'label',
    'text' => 'text',
    'date' => 'date',
    'boolean' => 'boolean'
  }
  super.merge map
end

Instance Method Details

#valueObject

nodoc



24
25
26
# File 'lib/capsulecrm/custom_field.rb', line 24

def value
  date || text || boolean
end