Class: Catlogic::Mood
- Inherits:
-
Object
- Object
- Catlogic::Mood
- Defined in:
- lib/catlogic/mood.rb
Instance Attribute Summary collapse
-
#conclusiontype ⇒ Object
readonly
Returns the value of attribute conclusiontype.
-
#majortype ⇒ Object
readonly
Returns the value of attribute majortype.
-
#minortype ⇒ Object
readonly
Returns the value of attribute minortype.
Instance Method Summary collapse
-
#initialize(majortype, minortype, conclusiontype) ⇒ Mood
constructor
takes three propositionType objects.
- #label ⇒ Object
- #to_mood ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(majortype, minortype, conclusiontype) ⇒ Mood
takes three propositionType objects
6 7 8 9 10 |
# File 'lib/catlogic/mood.rb', line 6 def initialize(majortype, minortype, conclusiontype) @majortype = majortype.to_proposition_type @minortype = minortype.to_proposition_type @conclusiontype = conclusiontype.to_proposition_type end |
Instance Attribute Details
#conclusiontype ⇒ Object (readonly)
Returns the value of attribute conclusiontype.
3 4 5 |
# File 'lib/catlogic/mood.rb', line 3 def conclusiontype @conclusiontype end |
#majortype ⇒ Object (readonly)
Returns the value of attribute majortype.
3 4 5 |
# File 'lib/catlogic/mood.rb', line 3 def majortype @majortype end |
#minortype ⇒ Object (readonly)
Returns the value of attribute minortype.
3 4 5 |
# File 'lib/catlogic/mood.rb', line 3 def minortype @minortype end |
Instance Method Details
#label ⇒ Object
16 17 18 |
# File 'lib/catlogic/mood.rb', line 16 def label "#{@majortype.label}#{@minortype.label}#{@conclusiontype.label}" end |
#to_mood ⇒ Object
12 13 14 |
# File 'lib/catlogic/mood.rb', line 12 def to_mood self end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/catlogic/mood.rb', line 20 def to_s self.label end |