Class: Restforce::Concerns::Picklists::PicklistValues

Inherits:
Array
  • Object
show all
Defined in:
lib/restforce/concerns/picklists.rb

Instance Method Summary collapse

Constructor Details

#initialize(fields, field, options = {}) ⇒ PicklistValues

Returns a new instance of PicklistValues.



32
33
34
35
36
37
38
39
# File 'lib/restforce/concerns/picklists.rb', line 32

def initialize(fields, field, options = {})
  @fields = fields
  @field = field
  @valid_for = options.delete(:valid_for)
  raise "#{field} is not a dependent picklist" if @valid_for && !dependent?

  super(picklist_values)
end