class Michael::Models::Status
Attributes
status[R]
Public Class Methods
new(status, pastel_params: {})
click to toggle source
# File lib/michael/models/status.rb, line 8 def initialize(status, pastel_params: {}) @status = status @pastel_params = pastel_params end
Public Instance Methods
dot()
click to toggle source
# File lib/michael/models/status.rb, line 21 def dot dot_status[state] end
state()
click to toggle source
# File lib/michael/models/status.rb, line 13 def state status[:state].to_sym end
updated_at()
click to toggle source
# File lib/michael/models/status.rb, line 17 def updated_at status[:updated_at] end
Private Instance Methods
dot_status()
click to toggle source
# File lib/michael/models/status.rb, line 29 def dot_status @dot_status ||= { success: pastel.green('+'), pending: pastel.yellow('.'), error: pastel.red('x'), failure: pastel.red('x') } end
pastel()
click to toggle source
# File lib/michael/models/status.rb, line 38 def pastel @pastel ||= Pastel.new(@pastel_params) end