Class: Circle::CLI::Model
- Inherits:
-
Object
- Object
- Circle::CLI::Model
- Defined in:
- lib/circle/cli/model.rb
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
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(attributes = {}) ⇒ Model
constructor
A new instance of Model.
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
#attributes ⇒ Object (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 |