Class: VWorkApp::CustomField
- Inherits:
-
Base
- Object
- Base
- VWorkApp::CustomField
show all
- Defined in:
- lib/vworkapp_ruby/custom_field.rb
Instance Method Summary
collapse
Methods inherited from Base
#attributes, #attributes=, #attributes_eql?, hattr_accessor, hattr_reader, hattr_writer, #hattrs, hattrs, #read_attributes, #read_attributes=, #read_hattrs, read_hattrs, #validate_and_raise, #write_attributes, #write_attributes=, write_hattrs, #write_hattrs
Constructor Details
#initialize(attributes = {}) ⇒ CustomField
Returns a new instance of CustomField.
14
15
16
17
18
|
# File 'lib/vworkapp_ruby/custom_field.rb', line 14
def initialize(attributes = {})
mobile_type = attributes.delete(:type)
super
self.mobile ||= VWorkApp::CustomFieldMobile.new(type: mobile_type)
end
|
Instance Method Details
#==(other) ⇒ Object
20
21
22
|
# File 'lib/vworkapp_ruby/custom_field.rb', line 20
def ==(other)
attributes_eql?(other, :name, :value, :mobile)
end
|
#type ⇒ Object
24
25
26
|
# File 'lib/vworkapp_ruby/custom_field.rb', line 24
def type
self.mobile.type
end
|
#type=(val) ⇒ Object
28
29
30
|
# File 'lib/vworkapp_ruby/custom_field.rb', line 28
def type=(val)
self.mobile.type = val
end
|