Module: Reform::Representer::WithOptions

Included in:
Contract::Setup::Representer, Form::Sync::InputRepresenter
Defined in:
lib/reform/representer.rb

Overview

Invokes #to_hash and/or #from_hash with #options. This provides a hook for other modules to add options for the representational process.

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

Instance Method Details

#from_hashObject



37
38
39
# File 'lib/reform/representer.rb', line 37

def from_hash(*)
  super(options)
end

#optionsObject



29
30
31
# File 'lib/reform/representer.rb', line 29

def options
  Options.new
end

#to_hashObject



33
34
35
# File 'lib/reform/representer.rb', line 33

def to_hash(*)
  super(options)
end