Class: PryTheme::Color

Inherits:
Struct
  • Object
show all
Defined in:
lib/pry-theme/palette.rb

Overview

Creates a new color.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#humanObject

Returns the value of attribute human

Returns:

  • (Object)

    the current value of human



24
25
26
# File 'lib/pry-theme/palette.rb', line 24

def human
  @human
end

#termObject

Returns the value of attribute term

Returns:

  • (Object)

    the current value of 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