Class: Circle::CLI::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/circle/cli/model.rb

Direct Known Subclasses

Build, Step

Constant Summary collapse

TIME_FORMAT =
'%-b %-e, %-l:%M %p'
STATUS_COLORS =
{
  green: %w(fixed success),
  yellow: %w(running retried not_run queued scheduled not_running no_tests),
  red: %w(canceled infrastructure_fail timedout failed)
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Model

Returns a new instance of Model.



14
15
16
# File 'lib/circle/cli/model.rb', line 14

def initialize(attributes = {})
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



12
13
14
# File 'lib/circle/cli/model.rb', line 12

def attributes
  @attributes
end

Instance Method Details

#[](key) ⇒ Object



18
19
20
# File 'lib/circle/cli/model.rb', line 18

def [](key)
  @attributes[key.to_s]
end