Class: Solid::Result::Config
- Inherits:
-
Object
- Object
- Solid::Result::Config
- Defined in:
- lib/solid/result/config.rb,
lib/solid/result/config/options.rb,
lib/solid/result/config/switcher.rb,
lib/solid/result/config/switchers/addons.rb,
lib/solid/result/config/switchers/features.rb,
lib/solid/result/config/switchers/constant_aliases.rb,
lib/solid/result/config/switchers/pattern_matching.rb
Defined Under Namespace
Modules: Options
Instance Attribute Summary collapse
-
#addon ⇒ Object
readonly
Returns the value of attribute addon.
-
#constant_alias ⇒ Object
readonly
Returns the value of attribute constant_alias.
-
#feature ⇒ Object
readonly
Returns the value of attribute feature.
-
#pattern_matching ⇒ Object
readonly
Returns the value of attribute pattern_matching.
Instance Method Summary collapse
- #and_then! ⇒ Object
- #event_logs ⇒ Object
- #freeze ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #inspect ⇒ Object
- #options ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 |
# File 'lib/solid/result/config.rb', line 14 def initialize @addon = Addons.switcher @feature = Features.switcher @constant_alias = ConstantAliases.switcher @pattern_matching = PatternMatching.switcher @and_then_ = CallableAndThen::Config.new end |
Instance Attribute Details
#addon ⇒ Object (readonly)
Returns the value of attribute addon.
12 13 14 |
# File 'lib/solid/result/config.rb', line 12 def addon @addon end |
#constant_alias ⇒ Object (readonly)
Returns the value of attribute constant_alias.
12 13 14 |
# File 'lib/solid/result/config.rb', line 12 def constant_alias @constant_alias end |
#feature ⇒ Object (readonly)
Returns the value of attribute feature.
12 13 14 |
# File 'lib/solid/result/config.rb', line 12 def feature @feature end |
#pattern_matching ⇒ Object (readonly)
Returns the value of attribute pattern_matching.
12 13 14 |
# File 'lib/solid/result/config.rb', line 12 def pattern_matching @pattern_matching end |
Instance Method Details
#and_then! ⇒ Object
26 27 28 |
# File 'lib/solid/result/config.rb', line 26 def and_then! @and_then_ end |
#event_logs ⇒ Object
22 23 24 |
# File 'lib/solid/result/config.rb', line 22 def event_logs EventLogs::Config.instance end |
#freeze ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/solid/result/config.rb', line 30 def freeze addon.freeze feature.freeze constant_alias.freeze pattern_matching.freeze and_then!.freeze event_logs.freeze super end |
#inspect ⇒ Object
54 55 56 57 58 |
# File 'lib/solid/result/config.rb', line 54 def inspect "#<#{self.class.name} " \ "options=#{.keys.sort.inspect} " \ "and_then!=#{and_then!..inspect}>" end |
#options ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/solid/result/config.rb', line 41 def { addon: addon, feature: feature, constant_alias: constant_alias, pattern_matching: pattern_matching } end |
#to_h ⇒ Object
50 51 52 |
# File 'lib/solid/result/config.rb', line 50 def to_h .transform_values(&:to_h) end |