Class: Linguistics::Latin::Verb::LatinVerb::ParticiplesFactory

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/latinverb_participles/participles_factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(verb) ⇒ ParticiplesFactory

Returns a new instance of ParticiplesFactory.



9
10
11
# File 'lib/latinverb_participles/participles_factory.rb', line 9

def initialize(verb)
  @verb = verb
end

Instance Method Details

#deponentObject



26
27
28
# File 'lib/latinverb_participles/participles_factory.rb', line 26

def deponent
  DeponentParticipler.new(@verb)
end

#irregularObject



22
23
24
# File 'lib/latinverb_participles/participles_factory.rb', line 22

def irregular
  Linguistics::Latin::Verb::LatinVerb::IrregularParticiplesRetriever.new(@verb.original_string).retrieve
end

#participlesObject



13
14
15
16
17
18
19
20
# File 'lib/latinverb_participles/participles_factory.rb', line 13

def participles
  return irregular if irregular?
  if deponent? || semideponent?
    deponent
  else
    standard
  end
end

#standardObject



30
31
32
# File 'lib/latinverb_participles/participles_factory.rb', line 30

def standard
  Participler.new(@verb)
end