class Granite::Action::Precondition

Constants

UNDEFINED

Attributes

context[R]

Public Class Methods

description(text = UNDEFINED) click to toggle source
# File lib/granite/action/precondition.rb, line 6
def self.description(text = UNDEFINED)
  case text
  when UNDEFINED
    @description
  else
    @description = text
  end
end
new(context) click to toggle source
# File lib/granite/action/precondition.rb, line 15
def initialize(context)
  @context = context
end

Public Instance Methods

call(*) click to toggle source
# File lib/granite/action/precondition.rb, line 19
def call(*)
  fail NotImplementedError, "#call method must be implemented for #{self.class}"
end
method_missing(method_name, *args, &blk) click to toggle source
Calls superclass method
# File lib/granite/action/precondition.rb, line 23
def method_missing(method_name, *args, &blk)
  super unless @context.respond_to?(method_name)

  @context.__send__(method_name, *args, &blk)
end
respond_to_missing?(method_name, _include_private = false) click to toggle source
# File lib/granite/action/precondition.rb, line 29
def respond_to_missing?(method_name, _include_private = false)
  @context.respond_to?(method_name)
end