Method: Filemaker::Model::Field#initialize

Defined in:
lib/filemaker/model/field.rb

#initialize(name, type, options = {}) ⇒ Field

Returns a new instance of Field.



9
10
11
12
13
14
15
16
17
# File 'lib/filemaker/model/field.rb', line 9

def initialize(name, type, options = {})
  @name = name
  @type = type
  @default_value = coerce(options.fetch(:default) { nil })

  # We need to downcase because Filemaker::Record is
  # HashWithIndifferentAndCaseInsensitiveAccess
  @fm_name = (options.fetch(:fm_name) { name }).to_s.downcase
end