Class: Ccp::Receivers::Commentable::Comment
- Inherits:
-
Struct
- Object
- Struct
- Ccp::Receivers::Commentable::Comment
- Includes:
- Utils::Colorize
- Defined in:
- lib/ccp/receivers/commentable.rb,
lib/ccp/receivers/commentable.rb
Constant Summary
Constants included from Utils::Colorize::Fore
Utils::Colorize::Fore::BLACK, Utils::Colorize::Fore::BLUE, Utils::Colorize::Fore::CLEAR, Utils::Colorize::Fore::CYAN, Utils::Colorize::Fore::GREEN, Utils::Colorize::Fore::MAGENTA, Utils::Colorize::Fore::RED, Utils::Colorize::Fore::WHITE, Utils::Colorize::Fore::YELLOW
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Methods included from Utils::Colorize
Methods included from Utils::Colorize::Fore
#aqua, #black, #blue, #colorize, #cyan, #green, #magenta, #pink, #purple, #red, #white, #yellow
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level
5 6 7 |
# File 'lib/ccp/receivers/commentable.rb', line 5 def level @level end |
#text ⇒ Object
Returns the value of attribute text
5 6 7 |
# File 'lib/ccp/receivers/commentable.rb', line 5 def text @text end |
Instance Method Details
#colorized ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/ccp/receivers/commentable.rb', line 8 def colorized case level when :warn ; yellow(text) when :error, :fatal ; red(text) when :info ; green(text) else ; text end end |