Module: Frontman::ForwardCallsToApp

Included in:
Context
Defined in:
lib/frontman/concerns/forward_calls_to_app.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *arguments, &block) ⇒ Object



10
11
12
# File 'lib/frontman/concerns/forward_calls_to_app.rb', line 10

def method_missing(method_id, *arguments, &block)
  Frontman::App.instance.public_send(method_id, *arguments, &block)
end

Class Method Details

.included(klass) ⇒ Object



6
7
8
# File 'lib/frontman/concerns/forward_calls_to_app.rb', line 6

def self.included(klass)
  klass.extend Frontman::ForwardCallsToApp::ClassMethods
end

Instance Method Details

#respond_to_missing?(method_name, _ = false) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/frontman/concerns/forward_calls_to_app.rb', line 14

def respond_to_missing?(method_name, _ = false)
  Frontman::App.instance.respond_to?(method_name)
end