Class: ActiveDryForm::BaseForm::HashRecord

Inherits:
Hash
  • Object
show all
Defined in:
lib/active_dry_form/base_form.rb

Instance Method Summary collapse

Instance Method Details

#define_methodsObject



276
277
278
279
280
# File 'lib/active_dry_form/base_form.rb', line 276

def define_methods
  keys.each do |key|
    define_singleton_method(key) { fetch(key) }
  end
end

#idObject



272
273
274
# File 'lib/active_dry_form/base_form.rb', line 272

def id
  self[:id] || self['id']
end

#persisted?Boolean

Returns:

  • (Boolean)


268
269
270
# File 'lib/active_dry_form/base_form.rb', line 268

def persisted?
  false
end