module Conjugate::Spanish

Public Instance Methods

common_name(t) click to toggle source
# File lib/conjugate/spanish.rb, line 24
def common_name(t)
  return nil unless t
  actual_tense = t.to_s.gsub(' ', '_').to_sym
  @changable_names ||= {:past => :preterite}
  actual_tense = @changable_names[actual_tense] || actual_tense
  actual_tense
end
find_irregular(verb) click to toggle source
# File lib/conjugate/spanish.rb, line 16
def find_irregular(verb)
  SpanishIrregularVerbs[verb.downcase]
end
generate_list_of_know_irregular_verbs() click to toggle source
# File lib/conjugate/spanish.rb, line 12
def generate_list_of_know_irregular_verbs
  puts "- " + SpanishIrregularVerbs.keys.sort.join("\n- ")
end
template(opts) click to toggle source
# File lib/conjugate/spanish.rb, line 20
def template(opts)
  SpanishTemplates[(opts[:template] || find_irregular(opts[:verb]) || regular_ending(opts[:verb])).to_sym]
end