Class: Gitenv::Status
- Inherits:
-
Object
- Object
- Gitenv::Status
- Defined in:
- lib/gitenv/status.rb
Constant Summary collapse
- TYPES =
%i[ok missing warning error]
- COLORS =
{ ok: :green, missing: :blue, warning: :yellow, error: :red }
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/gitenv/status.rb', line 6 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/gitenv/status.rb', line 6 def type @type end |
Instance Method Details
#color ⇒ Object
26 27 28 |
# File 'lib/gitenv/status.rb', line 26 def color COLORS[@type] end |
#marker ⇒ Object
22 23 24 |
# File 'lib/gitenv/status.rb', line 22 def marker @type == :ok ? '✓' : '✗' end |