module Tracinho
Main module
This gem converts words with dash in the version without it and vice-versa. It also gets the verb name from a word and gives the full grammar classification of the verb.
Constants
- VERSION
Public Class Methods
pair?(word1, word2)
click to toggle source
Returns true if one word is the complement of the other.
w1 = Word.new('fizeste') w2 = Word.new('fizes-te') Tracinho.pair?(w1, w2) # => true
# File lib/tracinho.rb, line 17 def self.pair?(word1, word2) word1 = Word.new(word1) unless word1.is_a?(Word) word2 = Word.new(word2) unless word2.is_a?(Word) word1.complement.to_s == word2.to_s end
Also aliased as: complementary?