class Plugin::Command::Condition

Public Class Methods

new() click to toggle source
# File core/plugin/command/conditions.rb, line 11
def initialize
  @cond = Proc.new
  type_strict @cond => :call end

Public Instance Methods

&(follow) click to toggle source
# File core/plugin/command/conditions.rb, line 15
def &(follow)
  type_strict follow => :call
  Condition.new{ |opt| call(opt) && follow.call(opt) } end
===(opt)
Alias for: call
[](opt)
Alias for: call
call(opt) click to toggle source
# File core/plugin/command/conditions.rb, line 23
def call(opt)
  @cond.call(opt) end
Also aliased as: ===, []
|(follow) click to toggle source
# File core/plugin/command/conditions.rb, line 19
def |(follow)
  type_strict follow => :call
  Condition.new{ |opt| call(opt) || follow.call(opt) } end