Module: Raix::Predicate::ClassMethods

Defined in:
lib/raix/predicate.rb

Overview

Class methods added to the including class

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#maybe_blockObject (readonly)

Returns the value of attribute maybe_block.



53
54
55
# File 'lib/raix/predicate.rb', line 53

def maybe_block
  @maybe_block
end

#no_blockObject (readonly)

Returns the value of attribute no_block.



53
54
55
# File 'lib/raix/predicate.rb', line 53

def no_block
  @no_block
end

#yes_blockObject (readonly)

Returns the value of attribute yes_block.



53
54
55
# File 'lib/raix/predicate.rb', line 53

def yes_block
  @yes_block
end

Instance Method Details

#maybe?(&block) ⇒ Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/raix/predicate.rb', line 63

def maybe?(&block)
  @maybe_block = block
end

#no?(&block) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/raix/predicate.rb', line 59

def no?(&block)
  @no_block = block
end

#yes?(&block) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/raix/predicate.rb', line 55

def yes?(&block)
  @yes_block = block
end