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, = {}) @name = name @type = type @default_value = coerce(.fetch(:default) { nil }) # We need to downcase because Filemaker::Record is # HashWithIndifferentAndCaseInsensitiveAccess @fm_name = (.fetch(:fm_name) { name }).to_s.downcase end |