Class: Gitenv::Status

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/gitenv/status.rb', line 6

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/gitenv/status.rb', line 6

def type
  @type
end

Instance Method Details

#colorObject



26
27
28
# File 'lib/gitenv/status.rb', line 26

def color
  COLORS[@type]
end

#markerObject



22
23
24
# File 'lib/gitenv/status.rb', line 22

def marker
  @type == :ok ? '' : ''
end