class Declension::Wrappers::String

Attributes

string[RW]

Public Class Methods

new(string) click to toggle source
# File lib/declension/wrappers/string.rb, line 6
def initialize(string)
  @string = string
end

Public Instance Methods

inflect(grammar_case, options) click to toggle source
# File lib/declension/wrappers/string.rb, line 10
def inflect(grammar_case, options)
  string.split(" ").map{|word| Declension::Word.new(word).inflect(grammar_case, options) }.join(" ")
end