class PipedriveJetrockets::Field

Attributes

is_subfield[RW]
option_id[RW]

Public Class Methods

new(hash) click to toggle source
Calls superclass method PipedriveJetrockets::Entity::new
# File lib/pipedrive_jetrockets/field.rb, line 4
def initialize(hash)
  super
  @is_subfield ||= false
end

Public Instance Methods

options_hash() click to toggle source
# File lib/pipedrive_jetrockets/field.rb, line 9
def options_hash
  return {} unless @options
  @options.map{|option|{option['id'].to_s => option['label']}}.inject(:merge)
end
value() click to toggle source
# File lib/pipedrive_jetrockets/field.rb, line 14
def value
  options_hash[option_id]
end