Class: Aldous::Params
Constant Summary
Constants included from Aldous
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #error_message ⇒ Object
- #fetch ⇒ Object
-
#initialize(params) ⇒ Params
constructor
A new instance of Params.
- #permitted_params ⇒ Object
Methods included from Aldous
Constructor Details
#initialize(params) ⇒ Params
Returns a new instance of Params.
15 16 17 |
# File 'lib/aldous/params.rb', line 15 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
13 14 15 |
# File 'lib/aldous/params.rb', line 13 def params @params end |
Class Method Details
.build(*args) ⇒ Object
8 9 10 |
# File 'lib/aldous/params.rb', line 8 def build(*args) new(*args) end |
Instance Method Details
#error_message ⇒ Object
30 31 32 |
# File 'lib/aldous/params.rb', line 30 def 'Missing param' end |
#fetch ⇒ Object
19 20 21 22 23 24 |
# File 'lib/aldous/params.rb', line 19 def fetch permitted_params rescue => e Aldous::LoggingWrapper.log(e) nil end |
#permitted_params ⇒ Object
26 27 28 |
# File 'lib/aldous/params.rb', line 26 def permitted_params {} end |