Class: ChatCorrect::Possessive
- Inherits:
-
Object
- Object
- ChatCorrect::Possessive
- Defined in:
- lib/chat_correct/possessive.rb
Instance Attribute Summary collapse
-
#token_a ⇒ Object
readonly
Returns the value of attribute token_a.
-
#token_b ⇒ Object
readonly
Returns the value of attribute token_b.
Instance Method Summary collapse
-
#initialize(token_a:, token_b:) ⇒ Possessive
constructor
A new instance of Possessive.
- #possessive? ⇒ Boolean
Constructor Details
#initialize(token_a:, token_b:) ⇒ Possessive
Returns a new instance of Possessive.
4 5 6 7 |
# File 'lib/chat_correct/possessive.rb', line 4 def initialize(token_a:, token_b:) @token_a = token_a @token_b = token_b end |
Instance Attribute Details
#token_a ⇒ Object (readonly)
Returns the value of attribute token_a.
3 4 5 |
# File 'lib/chat_correct/possessive.rb', line 3 def token_a @token_a end |
#token_b ⇒ Object (readonly)
Returns the value of attribute token_b.
3 4 5 |
# File 'lib/chat_correct/possessive.rb', line 3 def token_b @token_b end |
Instance Method Details
#possessive? ⇒ Boolean
9 10 11 12 13 14 |
# File 'lib/chat_correct/possessive.rb', line 9 def possessive? check_for_possessive(token_a, token_b, "ƪ") || check_for_possessive(token_b, token_a, "ƪ") || check_for_possessive(token_a, token_b, "∮") || check_for_possessive(token_b, token_a, "∮") end |