Module: Ghaki::Match::Mixin::AutoBoolean

Defined in:
lib/ghaki/match/mixin/auto_boolean.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#auto_boolean_matcherObject



11
12
13
# File 'lib/ghaki/match/mixin/auto_boolean.rb', line 11

def auto_boolean_matcher
  @auto_boolean_matcher ||= Ghaki::Match::Parser::Boolean.new
end

Instance Method Details

#boolean_field(key, val, opts = {}, &block) ⇒ Object



27
28
29
# File 'lib/ghaki/match/mixin/auto_boolean.rb', line 27

def boolean_field key, val, opts={}, &block
  auto_boolean_matcher.parse_field( key, val, opts, &block )
end

#boolean_lookupObject



15
16
17
# File 'lib/ghaki/match/mixin/auto_boolean.rb', line 15

def boolean_lookup
  auto_boolean_matcher.boolean_lookup
end

#boolean_lookup=(val) ⇒ Object



19
20
21
# File 'lib/ghaki/match/mixin/auto_boolean.rb', line 19

def boolean_lookup= val
  auto_boolean_matcher.boolean_lookup= val
end

#boolean_value(val, opts = {}, &block) ⇒ Object



23
24
25
# File 'lib/ghaki/match/mixin/auto_boolean.rb', line 23

def boolean_value val, opts={}, &block
  auto_boolean_matcher.parse_value( val, opts, &block )
end