Class: String

Inherits:
Object show all
Defined in:
lib/merb-core/test/test_ext/string.rb,
lib/merb-core/vendor/facets/inflect.rb

Instance Method Summary collapse

Instance Method Details

#contain?(value) ⇒ Boolean Also known as: contains?

Returns:

  • (Boolean)


2
3
4
# File 'lib/merb-core/test/test_ext/string.rb', line 2

def contain?(value)
  self.include?(value)
end

#match?(regex) ⇒ Boolean Also known as: matches?

Returns:

  • (Boolean)


8
9
10
# File 'lib/merb-core/test/test_ext/string.rb', line 8

def match?(regex)
  self.match(regex)
end

#pluralObject Also known as: pluralize



341
342
343
# File 'lib/merb-core/vendor/facets/inflect.rb', line 341

def plural
  Language::English::Inflect.plural(self)
end

#singularObject Also known as: singularize



337
338
339
# File 'lib/merb-core/vendor/facets/inflect.rb', line 337

def singular
  Language::English::Inflect.singular(self)
end