Class: Linguistics::EN::Infinitives::Infinitive
- Inherits:
-
String
- Object
- String
- Linguistics::EN::Infinitives::Infinitive
- Defined in:
- lib/linguistics/en/infinitives.rb
Overview
The object class for the result returned from calling Linguistics::EN::infinitive.
Instance Attribute Summary collapse
-
#rule ⇒ Object
readonly
The rule used.
-
#suffix ⇒ Object
readonly
The suffix used to to identify the transform rule.
-
#word2 ⇒ Object
readonly
The fallback deconjugated form.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Equality operator: returns
true
ifother
is == to either of the receiver’s words. -
#initialize(word1, word2, suffix, rule) ⇒ Infinitive
constructor
Create and return a new Infinitive object.
Constructor Details
#initialize(word1, word2, suffix, rule) ⇒ Infinitive
Create and return a new Infinitive object.
1000 1001 1002 1003 1004 1005 |
# File 'lib/linguistics/en/infinitives.rb', line 1000 def initialize( word1, word2, suffix, rule ) super( word1 ) @word2 = word2 @suffix = suffix @rule = rule end |
Instance Attribute Details
#rule ⇒ Object (readonly)
The rule used
1019 1020 1021 |
# File 'lib/linguistics/en/infinitives.rb', line 1019 def rule @rule end |
#suffix ⇒ Object (readonly)
The suffix used to to identify the transform rule
1016 1017 1018 |
# File 'lib/linguistics/en/infinitives.rb', line 1016 def suffix @suffix end |
#word2 ⇒ Object (readonly)
The fallback deconjugated form
1013 1014 1015 |
# File 'lib/linguistics/en/infinitives.rb', line 1013 def word2 @word2 end |
Instance Method Details
#==(other) ⇒ Object
Equality operator: returns true
if other
is == to either of the receiver’s words.
1022 1023 1024 |
# File 'lib/linguistics/en/infinitives.rb', line 1022 def ==( other ) return super(other) || @word2 == other end |