Class: Gitenv::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/gitenv/status.rb

Constant Summary collapse

TYPES =
[ :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.



9
10
11
# File 'lib/gitenv/status.rb', line 9

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'lib/gitenv/status.rb', line 9

def type
  @type
end

Instance Method Details

#colorObject



29
30
31
# File 'lib/gitenv/status.rb', line 29

def color
  COLORS[@type]
end

#markerObject



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

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