Module: Composition::Macros::Compose

Extended by:
ActiveSupport::Concern
Defined in:
lib/composition/macros/compose.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/composition/macros/compose.rb', line 6

def method_missing(method_name, *args, &block)
  if match_composition?(method_name)
    Composition::Builders::Compose.new(self).def_composition_methods
    send(method_name, *args, &block)
  else
    super
  end
end

Instance Method Details

#respond_to?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
19
20
21
22
# File 'lib/composition/macros/compose.rb', line 15

def respond_to?(method_name, include_private = false)
  if match_composition?(method_name)
    Composition::Builders::Compose.new(self).def_composition_methods
    true
  else
    super
  end
end