verbs 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/verbs/verblike.rb +3 -3
- data/lib/verbs/version.rb +1 -1
- data/test/test_verbs.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbdce4813c2a5b0f03af2fb7ec38baabc6eb64bd4394cc94fa4c330cbfbb5ab1
|
4
|
+
data.tar.gz: acf35a43147e32c004af60c591ae4070752856a108f11436fcb3faf9af955d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6a4752df14975eddac3c03a21e89e707078b0768ab2b177b6021be8e8d0cc2a80f6622b68397a100cd88232bcfce199b585da9c0e72f7bb5a190346a5b939c6
|
7
|
+
data.tar.gz: bc648fd9cf599de7a9743ac2810f0e26b6c4f677e238ef9b65ef827ad9d325057ead500227ea2a292358cfd9a607ba93366fa2f249818da7f6ef6e7e0fa8fcef
|
data/lib/verbs/verblike.rb
CHANGED
@@ -4,17 +4,17 @@ module Verbs
|
|
4
4
|
def initialize(base)
|
5
5
|
@base = base
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def conjugate(options)
|
9
9
|
words = @base.to_s.split(' ')
|
10
10
|
words.shift if words.first.downcase == 'to'
|
11
|
-
infinitive = words.shift.to_sym
|
11
|
+
infinitive = words.shift.downcase.to_sym
|
12
12
|
conjugation = ::Verbs::Conjugator.conjugate infinitive, options
|
13
13
|
conjugated = words.unshift(conjugation.to_s).join(' ')
|
14
14
|
@base.is_a?(Symbol) ? conjugated.to_sym : conjugated
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
module Access
|
19
19
|
def verb
|
20
20
|
::Verbs::Verblike::Wrapper.new self
|
data/lib/verbs/version.rb
CHANGED
data/test/test_verbs.rb
CHANGED
@@ -109,6 +109,7 @@ class TestVerbs < Test::Unit::TestCase
|
|
109
109
|
def test_core_access
|
110
110
|
assert_equal :accepts, :accept.verb.conjugate(:tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
111
111
|
assert_equal 'accepts', 'accept'.verb.conjugate(:tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
112
|
+
assert_equal 'Girl is Near', 'Be Near'.verb.conjugate(:subject => 'Girl')
|
112
113
|
end
|
113
114
|
def test_aspects
|
114
115
|
Verbs::Conjugator.with_options :person => :first, :plurality => :singular, :subject => true do |standard|
|