diff --git a/lib/ika_conjugations/verb.rb b/lib/ika_conjugations/verb.rb index a77a837..c0c6cba 100644 --- a/lib/ika_conjugations/verb.rb +++ b/lib/ika_conjugations/verb.rb @@ -89,6 +89,10 @@ module IkaConjugations def potential_starter stem + "られる" end + + def ba + stem + "れば" + end end class Godan < Verb @@ -144,6 +148,10 @@ module IkaConjugations def volitional all_but_last_character + last_character("o") + "う" end + + def ba + all_but_last_character + last_character("e") + "ば" + end end class Suru < Verb @@ -166,6 +174,10 @@ module IkaConjugations def potential_starter prefix + "できる" end + + def ba + prefix + "すれば" + end end class Kuru < Verb @@ -188,6 +200,10 @@ module IkaConjugations def potential_starter negative_stem + "られる" end + + def ba + prefix + KanaKanji.new("く", "来") + "れば" + end end end end diff --git a/test/ika_conjugations/test_verb.rb b/test/ika_conjugations/test_verb.rb index c335274..4787be3 100644 --- a/test/ika_conjugations/test_verb.rb +++ b/test/ika_conjugations/test_verb.rb @@ -238,5 +238,16 @@ module IkaConjugations assert_equal "あろう", @aru.volitional.kana assert_equal "あおう", @au.volitional.kana end + + def test_ba + assert_equal "見れば", @miru.ba.kanji + assert_equal "飲めば", @nomu.ba.kanji + assert_equal "すれば", @suru.ba.kanji + assert_equal "勉強すれば", @benkyousuru.ba.kanji + assert_equal "来れば", @kuru.ba.kanji + assert_equal "連れて来れば", @tsuretekuru.ba.kanji + assert_equal "あれば", @aru.ba.kanji + assert_equal "会えば", @au.ba.kanji + end end end