class Muack::Satisfying
Public Class Methods
new(args=nil, &block)
click to toggle source
Calls superclass method
# File lib/muack/satisfying.rb, line 6 def initialize args=nil, &block super(args, block) end
Public Instance Methods
&(rhs;)
click to toggle source
# File lib/muack/satisfying.rb, line 15 def & rhs; Satisfying::Conj.new(self, rhs); end
api_args()
click to toggle source
Calls superclass method
# File lib/muack/satisfying.rb, line 53 def api_args super || [block || method(:match)] end
api_name()
click to toggle source
# File lib/muack/satisfying.rb, line 48 def api_name (self.class.name || 'Unknown')[/(::)*(\w+)$/, 2]. gsub(/([A-Z][a-z]*)+?(?=[A-Z][a-z]*)/, '\\1_').downcase end
match(actual_arg)
click to toggle source
# File lib/muack/satisfying.rb, line 10 def match actual_arg !!block.call(actual_arg) end
to_s()
click to toggle source
# File lib/muack/satisfying.rb, line 43 def to_s "Muack::API.#{api_name}(#{api_args.map(&:inspect).join(', ')})" end
Also aliased as: inspect
|(rhs;)
click to toggle source
# File lib/muack/satisfying.rb, line 14 def | rhs; Satisfying::Disj.new(self, rhs); end