Class: AdequateExposure::Flow

Inherits:
Object
  • Object
show all
Defined in:
lib/adequate_exposure/flow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, options) ⇒ Flow

Returns a new instance of Flow.



5
6
7
8
9
# File 'lib/adequate_exposure/flow.rb', line 5

def initialize(controller, options)
  @controller = controller
  @options = options
  @name = options.fetch(:name)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



11
12
13
14
15
16
17
# File 'lib/adequate_exposure/flow.rb', line 11

def method_missing(name, *args, &block)
  if respond_to_missing?(name)
    handle_flow_method(name, *args, &block)
  else
    super
  end
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



3
4
5
# File 'lib/adequate_exposure/flow.rb', line 3

def controller
  @controller
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/adequate_exposure/flow.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/adequate_exposure/flow.rb', line 3

def options
  @options
end

Instance Method Details

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

Returns:

  • (Boolean)


19
20
21
# File 'lib/adequate_exposure/flow.rb', line 19

def respond_to_missing?(method_name, include_private = false)
  Behavior.method_defined?(method_name) || super
end