Class: Qreds::Config
- Inherits:
-
Object
- Object
- Qreds::Config
- Defined in:
- lib/qreds/config.rb
Instance Attribute Summary collapse
-
#default_lambda ⇒ Object
Returns the value of attribute default_lambda.
-
#functor_group ⇒ Object
Returns the value of attribute functor_group.
-
#operator_mapping ⇒ Object
Returns the value of attribute operator_mapping.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(args) ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 |
# File 'lib/qreds/config.rb', line 10 def initialize(args) args.each do |(key, value)| send("#{key}=", value) end end |
Instance Attribute Details
#default_lambda ⇒ Object
Returns the value of attribute default_lambda.
5 6 7 |
# File 'lib/qreds/config.rb', line 5 def default_lambda @default_lambda end |
#functor_group ⇒ Object
Returns the value of attribute functor_group.
5 6 7 |
# File 'lib/qreds/config.rb', line 5 def functor_group @functor_group end |
#operator_mapping ⇒ Object
Returns the value of attribute operator_mapping.
5 6 7 |
# File 'lib/qreds/config.rb', line 5 def operator_mapping @operator_mapping end |
Class Method Details
.define_reducer(helper_name, strategy: method(:define_endpoint_method)) {|config| ... } ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/qreds/config.rb', line 21 def define_reducer(helper_name, strategy: method(:define_endpoint_method)) config = new(functor_group: helper_name) yield config strategy.call(helper_name, config) end |