Passive form
This commit is contained in:
		
							parent
							
								
									37e3ce359f
								
							
						
					
					
						commit
						3977cc4c63
					
				| @ -73,6 +73,10 @@ module IkaConjugations | |||||||
|       negative_stem + "よう" |       negative_stem + "よう" | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|  |     def passive | ||||||
|  |       Ichidan.new(passive_starter.kanji, passive_starter.kana, "#{definition} (dissatisfied)") | ||||||
|  |     end | ||||||
|  | 
 | ||||||
|     class Ichidan < Verb |     class Ichidan < Verb | ||||||
|       def stem |       def stem | ||||||
|         all_but_last_character |         all_but_last_character | ||||||
| @ -93,6 +97,10 @@ module IkaConjugations | |||||||
|       def ba |       def ba | ||||||
|         stem + "れば" |         stem + "れば" | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       def passive_starter | ||||||
|  |         stem + "られる" | ||||||
|  |       end | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     class Godan < Verb |     class Godan < Verb | ||||||
| @ -152,6 +160,10 @@ module IkaConjugations | |||||||
|       def ba |       def ba | ||||||
|         all_but_last_character + last_character("e") + "ば" |         all_but_last_character + last_character("e") + "ば" | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       def passive_starter | ||||||
|  |         all_but_last_character + last_character("a") + "れる" | ||||||
|  |       end | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     class Suru < Verb |     class Suru < Verb | ||||||
| @ -178,6 +190,10 @@ module IkaConjugations | |||||||
|       def ba |       def ba | ||||||
|         prefix + "すれば" |         prefix + "すれば" | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       def passive_starter | ||||||
|  |         prefix + "される" | ||||||
|  |       end | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     class Kuru < Verb |     class Kuru < Verb | ||||||
| @ -204,6 +220,10 @@ module IkaConjugations | |||||||
|       def ba |       def ba | ||||||
|         prefix + KanaKanji.new("く", "来") + "れば" |         prefix + KanaKanji.new("く", "来") + "れば" | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       def passive_starter | ||||||
|  |         prefix + KanaKanji.new("こ", "来") + "られる" | ||||||
|  |       end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -249,5 +249,18 @@ module IkaConjugations | |||||||
|       assert_equal "あれば", @aru.ba.kanji |       assert_equal "あれば", @aru.ba.kanji | ||||||
|       assert_equal "会えば", @au.ba.kanji |       assert_equal "会えば", @au.ba.kanji | ||||||
|     end |     end | ||||||
|  | 
 | ||||||
|  |     def test_passive | ||||||
|  |       assert_equal "見られる", @miru.passive.dictionary.kanji | ||||||
|  |       assert_equal "飲まれる", @nomu.passive.dictionary.kanji | ||||||
|  |       assert_equal "される", @suru.passive.dictionary.kanji | ||||||
|  |       assert_equal "勉強される", @benkyousuru.passive.dictionary.kanji | ||||||
|  |       assert_equal "来られる", @kuru.passive.dictionary.kanji | ||||||
|  |       assert_equal "こられる", @kuru.passive.dictionary.kana | ||||||
|  |       assert_equal "連れて来られる", @tsuretekuru.passive.dictionary.kanji | ||||||
|  |       assert_equal "つれてこられる", @tsuretekuru.passive.dictionary.kana | ||||||
|  |       assert_equal "あられる", @aru.passive.dictionary.kanji | ||||||
|  |       assert_equal "会われる", @au.passive.dictionary.kanji | ||||||
|  |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user