Class: Yes::Core::CommandHandling::StateUpdater::BlockAnalyzer
- Inherits:
-
Object
- Object
- Yes::Core::CommandHandling::StateUpdater::BlockAnalyzer
- Defined in:
- lib/yes/core/command_handling/state_updater.rb
Overview
Helper class to analyze the update_state block at definition time
Instance Attribute Summary collapse
-
#updated_attributes ⇒ Object
readonly
Returns the value of attribute updated_attributes.
Instance Method Summary collapse
-
#initialize ⇒ BlockAnalyzer
constructor
A new instance of BlockAnalyzer.
- #method_missing(method_name, *_args) { ... } ⇒ void
- #respond_to_missing? ⇒ Boolean
Constructor Details
#initialize ⇒ BlockAnalyzer
Returns a new instance of BlockAnalyzer.
36 37 38 |
# File 'lib/yes/core/command_handling/state_updater.rb', line 36 def initialize @updated_attributes = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *_args) { ... } ⇒ void
This method returns an undefined value.
45 46 47 |
# File 'lib/yes/core/command_handling/state_updater.rb', line 45 def method_missing(method_name, *_args, &block) @updated_attributes << method_name if block end |
Instance Attribute Details
#updated_attributes ⇒ Object (readonly)
Returns the value of attribute updated_attributes.
34 35 36 |
# File 'lib/yes/core/command_handling/state_updater.rb', line 34 def updated_attributes @updated_attributes end |
Instance Method Details
#respond_to_missing? ⇒ Boolean
49 50 51 |
# File 'lib/yes/core/command_handling/state_updater.rb', line 49 def respond_to_missing?(*, **) true end |