Class: Daidai::View
- Inherits:
-
Object
- Object
- Daidai::View
- Defined in:
- lib/daidai/word.rb
Overview
A polarity/formality lens over a Word, returned by Word#polite etc. Calling a form name on it applies the accumulated modifiers; modifiers chain.
Instance Method Summary collapse
- #affirmative ⇒ Object
-
#initialize(word, negative:, polite:) ⇒ View
constructor
A new instance of View.
- #negative ⇒ Object
- #plain ⇒ Object
- #polite ⇒ Object
Constructor Details
#initialize(word, negative:, polite:) ⇒ View
Returns a new instance of View.
116 117 118 119 120 |
# File 'lib/daidai/word.rb', line 116 def initialize(word, negative:, polite:) @word = word @negative = negative @polite = polite end |
Instance Method Details
#affirmative ⇒ Object
125 |
# File 'lib/daidai/word.rb', line 125 def affirmative = View.new(@word, negative: false, polite: @polite) |
#negative ⇒ Object
124 |
# File 'lib/daidai/word.rb', line 124 def negative = View.new(@word, negative: true, polite: @polite) |