Class: LLT::Stem::AdjectivePack
- Inherits:
-
Pack
- Object
- Pack
- LLT::Stem::AdjectivePack
show all
- Defined in:
- lib/llt/stem/adjective_pack.rb
Instance Attribute Summary
Attributes inherited from Pack
#lemma, #lemma_key, #stems, #type
Instance Method Summary
collapse
Methods inherited from Pack
#lemma_with_key, #to_s
Constructor Details
#initialize(type, args, source, extension = true) ⇒ AdjectivePack
Returns a new instance of AdjectivePack.
4
5
6
7
8
|
# File 'lib/llt/stem/adjective_pack.rb', line 4
def initialize(type, args, source, extension = true)
super
@lemma = @stems.first.nominative
end
|
Instance Method Details
#o_decl_with_possible_ne_voc? ⇒ Boolean
28
29
30
31
32
33
|
# File 'lib/llt/stem/adjective_pack.rb', line 28
def o_decl_with_possible_ne_voc?
super do
st = @stems.find { |stem| stem.comparatio == :positivus }
st ? st.o_decl_with_possible_ne_voc? : false
end
end
|
#third_decl_with_possible_ne_abl? ⇒ Boolean
21
22
23
24
25
26
|
# File 'lib/llt/stem/adjective_pack.rb', line 21
def third_decl_with_possible_ne_abl?
super do
st = @stems.find { |stem| stem.comparatio == :positivus }
st ? st.third_decl_with_possible_ne_abl? : false
end
end
|
#to_hash(use = nil, options = {}) ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/llt/stem/adjective_pack.rb', line 10
def to_hash(use = nil, options = {})
selector = case options[:comparison_sign].to_s
when /^(|i?t?er)$/ then :positivus when /(ior|ius)/ then :comparativus
else :superlativus
end
stem = @stems.find { |st| st.comparatio == selector }
stem.to_hash.merge(options: options)
end
|