Class: StimulusAttrs::IdentifierScope

Inherits:
Object
  • Object
show all
Defined in:
lib/stimulus_attrs/identifier_scope.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


10
11
12
# File 'lib/stimulus_attrs/identifier_scope.rb', line 10

def respond_to_missing?(*args)
  StimulusAttrs.respond_to?(*args)
end