llt-form_builder 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a646c0ab62b83ed7eb989de75e56050ccf66ce9e
4
- data.tar.gz: 5ef3973cb4fd232122c3106c3914746a5400dd0e
3
+ metadata.gz: e146febadab62129fe1bf3d1a896824cb2cbcf27
4
+ data.tar.gz: 3c2907b019c2fd8197e5c2dc7ae736f12dcb1073
5
5
  SHA512:
6
- metadata.gz: db00fe6da74e40ec70a5224c2e73727082db3e0928bb58d433df1409595a2954e20594ebd11c378441ff0dbbb775126af46510456fc9c39f192efc2ca9d0740a
7
- data.tar.gz: 0f0295536d3d88e9a659cb8336df56d29c30b884c086083286d4d826a93d0fdc542e3b439ef0bb61de3851549962b544a2296ccb76df38cf9f22a61ef430a159
6
+ metadata.gz: 96553f5792b2343b82a8141bc798501dae41f8a0d9769b7c575504d0279a06c62c75cfac5fae87d2356b8606e2ebe88085ef13fb3bec8bdba1d3a0d9b847e7cf
7
+ data.tar.gz: 65337c8383989d938359261b11f249a041a3afbc3001f4d0b4ea53ab354fca4ae3907a5478a286a8abca7d87f67644ffee806338664f467ea8969d7130e379d2
@@ -1,5 +1,5 @@
1
1
  module LLT
2
2
  class FormBuilder
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -25,6 +25,13 @@ module LLT
25
25
  end
26
26
  end
27
27
 
28
+ def o_decl_with_possible_ne_voc?
29
+ super do
30
+ st = @stems.find { |stem| stem.comparatio == :positivus }
31
+ st ? st.o_decl_with_possible_ne_voc? : false
32
+ end
33
+ end
34
+
28
35
  private
29
36
 
30
37
  def extended_stems(args)
@@ -18,6 +18,10 @@ module LLT
18
18
  def third_decl_with_possible_ne_abl?
19
19
  @inflection_class == 3 && @nom.match(/nis$/) && @stem.match(/n$/)
20
20
  end
21
+
22
+ def o_decl_with_possible_ne_voc?
23
+ @inflection_class == 1 && @nom.match(/nus$/)
24
+ end
21
25
  end
22
26
  end
23
27
  end
@@ -9,6 +9,10 @@ module LLT
9
9
  def third_decl_with_possible_ne_abl?
10
10
  super { @stems.any?(&:third_decl_with_possible_ne_abl?) }
11
11
  end
12
+
13
+ def o_decl_with_possible_ne_voc?
14
+ super { @stems.any?(&:o_decl_with_possible_ne_voc?) }
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -21,6 +21,12 @@ module LLT
21
21
  @nom.match(/men$/) && @stem.match(/min$/)
22
22
  end
23
23
  end
24
+
25
+ def o_decl_with_possible_ne_voc?
26
+ if @inflection_class == 2
27
+ @nom.match(/nus$/)
28
+ end
29
+ end
24
30
  end
25
31
  end
26
32
  end
data/lib/llt/stem/pack.rb CHANGED
@@ -41,6 +41,10 @@ module LLT
41
41
  def third_decl_with_possible_ne_abl?
42
42
  block_given? ? yield : false
43
43
  end
44
+
45
+ def o_decl_with_possible_ne_voc?
46
+ block_given? ? yield : false
47
+ end
44
48
  end
45
49
  end
46
50
  end
@@ -7,9 +7,18 @@ describe LLT::Stem::AdjectiveStem do
7
7
  stem = as.new(:adjective, {nom: "communis", stem: "commun", inflection_class: 3})
8
8
  stem.third_decl_with_possible_ne_abl?.should be_true
9
9
 
10
-
11
10
  stem = as.new(:adjective, {nom: "facilis", stem: "facil", inflection_class: 3})
12
11
  stem.third_decl_with_possible_ne_abl?.should be_false
13
12
  end
14
13
  end
14
+
15
+ describe "#o_decl_with_possible_ne_voc?" do
16
+ it "does what it should" do
17
+ stem = as.new(:adjective, {nom: "bonus", inflection_class: 1})
18
+ stem.o_decl_with_possible_ne_voc?.should be_true
19
+
20
+ stem = as.new(:adjective, {nom: "pulcher", stem: "pulchr", inflection_class: 1})
21
+ stem.o_decl_with_possible_ne_voc?.should be_false
22
+ end
23
+ end
15
24
  end
@@ -11,4 +11,14 @@ describe LLT::Stem::NounStem do
11
11
  stem.third_decl_with_possible_ne_abl?.should be_false
12
12
  end
13
13
  end
14
+
15
+ describe "#o_decl_with_possible_ne_voc?" do
16
+ it "does what it should" do
17
+ stem = ns.new(:noun, { nom: "dominus", inflection_class: 2 })
18
+ stem.o_decl_with_possible_ne_voc?.should be_true
19
+
20
+ stem = ns.new(:noun, { nom: "ager", inflection_class: 2 })
21
+ stem.o_decl_with_possible_ne_voc?.should be_false
22
+ end
23
+ end
14
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llt-form_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LFDM
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-08 00:00:00.000000000 Z
12
+ date: 2014-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  version: '0'
282
282
  requirements: []
283
283
  rubyforge_project:
284
- rubygems_version: 2.1.5
284
+ rubygems_version: 2.2.0
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: "#{spec.description}"