Class: TenseFactory
- Inherits:
-
Object
- Object
- TenseFactory
- Defined in:
- lib/arabic_conjugator/factories/tense_factory.rb
Constant Summary collapse
Instance Method Summary collapse
- #create_tense ⇒ Object
-
#initialize(verb) ⇒ TenseFactory
constructor
A new instance of TenseFactory.
Constructor Details
#initialize(verb) ⇒ TenseFactory
Returns a new instance of TenseFactory.
11 12 13 14 |
# File 'lib/arabic_conjugator/factories/tense_factory.rb', line 11 def initialize(verb) @verb = verb @tense = verb.opts[:tense] end |
Instance Method Details
#create_tense ⇒ Object
16 17 18 |
# File 'lib/arabic_conjugator/factories/tense_factory.rb', line 16 def create_tense MAPPING[@tense].new(@verb) end |