Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/template/token.rb

Direct Known Subclasses

StringInquirer

Instance Method Summary collapse

Instance Method Details

#matches_false?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/template/token.rb', line 6

def matches_false?
  Regexp.new('n|no|false', Regexp::IGNORECASE).match(self)
end

#matches_true?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/template/token.rb', line 2

def matches_true?
  Regexp.new('y|yes|true', Regexp::IGNORECASE).match(self)
end