Module: Reform::Contract::Readonly

Included in:
Reform::Contract
Defined in:
lib/reform/contract.rb

Overview

DISCUSS: separate file?

Instance Method Summary collapse

Instance Method Details

#options_for(name) ⇒ Object



53
54
55
# File 'lib/reform/contract.rb', line 53

def options_for(name)
  self.class.options_for(name)
end

#readonly?(name) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/reform/contract.rb', line 49

def readonly?(name)
  options_for(name)[:writeable] == false
end