Class: Troles::Macros::StrategyOptions
- Defined in:
- lib/trole_groups/macros/strategy_options.rb,
lib/troles/common/macros/strategy_options.rb
Instance Attribute Summary collapse
-
#subject_class ⇒ Object
readonly
Returns the value of attribute subject_class.
Instance Method Summary collapse
- #apply_macro(name) ⇒ Object
-
#initialize(subject_class) ⇒ StrategyOptions
constructor
A new instance of StrategyOptions.
Constructor Details
#initialize(subject_class) ⇒ StrategyOptions
Returns a new instance of StrategyOptions.
6 7 8 |
# File 'lib/trole_groups/macros/strategy_options.rb', line 6 def initialize subject_class @subject_class = subject_class end |
Instance Attribute Details
#subject_class ⇒ Object (readonly)
Returns the value of attribute subject_class.
4 5 6 |
# File 'lib/trole_groups/macros/strategy_options.rb', line 4 def subject_class @subject_class end |
Instance Method Details
#apply_macro(name) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/trole_groups/macros/strategy_options.rb', line 11 def apply_macro name # overrides default method that returns false begin subject_class.send :include, "Troles::Macros::#{strategy_name.to_s.camelize}".constantize rescue end end |