Class: Linguistics::EN::Infinitives::Infinitive

Inherits:
String
  • Object
show all
Defined in:
lib/linguistics/en/infinitives.rb

Overview

The object class for the result returned from calling Linguistics::EN::infinitive.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#ruleObject (readonly)

The rule used



1019
1020
1021
# File 'lib/linguistics/en/infinitives.rb', line 1019

def rule
  @rule
end

#suffixObject (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

#word2Object (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