Class: PryTheme::Color
- Inherits:
-
Struct
- Object
- Struct
- PryTheme::Color
- Defined in:
- lib/pry-theme/palette.rb
Overview
Creates a new color.
Instance Attribute Summary collapse
-
#human ⇒ Object
Returns the value of attribute human.
-
#term ⇒ Object
Returns the value of attribute term.
Instance Method Summary collapse
Instance Attribute Details
#human ⇒ Object
Returns the value of attribute human
24 25 26 |
# File 'lib/pry-theme/palette.rb', line 24 def human @human end |
#term ⇒ Object
Returns the value of attribute term
24 25 26 |
# File 'lib/pry-theme/palette.rb', line 24 def term @term end |
Instance Method Details
#to_term(notation) ⇒ Object
25 26 27 |
# File 'lib/pry-theme/palette.rb', line 25 def to_term(notation) "\e[#{ notation }#{ term };7m#{ term }\e[0m:\e[#{ notation }#{ term }m#{ human }\e[0m" end |