class Flow::StateProxy

Attributes

_state[R]

Public Class Methods

new(state) click to toggle source
# File lib/flow/state_proxy.rb, line 6
def initialize(state)
  @_state = state
end

Public Instance Methods

method_missing(method_name, *arguments, &block) click to toggle source

@deprecated

Calls superclass method
# File lib/flow/state_proxy.rb, line 11
def method_missing(method_name, *arguments, &block)
  return super unless _state.respond_to?(method_name)

  ActiveSupport::Deprecation.warn(
    "Direct state access of `#{method_name}' on #{_state.inspect} will be removed in a future version of flow. "\
    "Use a state accessor instead - for more information see github/freshly/flow/deprecation_notice"
  )
  _state.public_send(method_name, *arguments, &block)
end
respond_to_missing?(method_name, include_private = false) click to toggle source

@deprecated

Calls superclass method
# File lib/flow/state_proxy.rb, line 22
def respond_to_missing?(method_name, include_private = false)
  _state.respond_to?(method_name) || super
end