class GHStatus::Message

Attributes

body[R]
created_on[R]
status[R]

Public Class Methods

last() click to toggle source
# File lib/ghstatus/message.rb, line 4
def last
  response = GHStatus::Api.last_message
  new(response['status'], response['body'], response['created_on'])
end
new(status, body, created_on) click to toggle source
# File lib/ghstatus/message.rb, line 19
def initialize(status, body, created_on)
  @body       = body
  @status     = status
  @created_on = DateTime.parse(created_on)
end
recent() click to toggle source
# File lib/ghstatus/message.rb, line 9
def recent
  response = GHStatus::Api.recent_messages
  response.collect do |r|
    new(r['status'], r['body'], r['created_on'])
  end
end