Class: Aldous::Params

Inherits:
Object
  • Object
show all
Includes:
Aldous
Defined in:
lib/aldous/params.rb

Constant Summary

Constants included from Aldous

VERSION

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Aldous

configuration

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

#paramsObject (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_messageObject



30
31
32
# File 'lib/aldous/params.rb', line 30

def error_message
  'Missing param'
end

#fetchObject



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_paramsObject



26
27
28
# File 'lib/aldous/params.rb', line 26

def permitted_params
  {}
end