Class: StimulusAttrs::IdentifierScope
- Inherits:
-
Object
- Object
- StimulusAttrs::IdentifierScope
- Defined in:
- lib/stimulus_attrs/identifier_scope.rb
Instance Method Summary collapse
-
#initialize(identifier) ⇒ IdentifierScope
constructor
A new instance of IdentifierScope.
- #method_missing(*args, **kwargs, &block) ⇒ Object
- #respond_to_missing?(*args) ⇒ Boolean
Constructor Details
#initialize(identifier) ⇒ IdentifierScope
Returns a new instance of IdentifierScope.
2 3 4 |
# File 'lib/stimulus_attrs/identifier_scope.rb', line 2 def initialize(identifier) @identifier = identifier end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, **kwargs, &block) ⇒ Object
6 7 8 |
# File 'lib/stimulus_attrs/identifier_scope.rb', line 6 def method_missing(*args, **kwargs, &block) StimulusAttrs.send(*args, **kwargs, identifier: @identifier, &block) end |
Instance Method Details
#respond_to_missing?(*args) ⇒ Boolean
10 11 12 |
# File 'lib/stimulus_attrs/identifier_scope.rb', line 10 def respond_to_missing?(*args) StimulusAttrs.respond_to?(*args) end |