class ServiceStatusResponse
Attributes
message[R]
state[R]
Public Class Methods
create(feedHtml)
click to toggle source
# File lib/src/ServiceStatusResponse.rb, line 12 def self.create(feedHtml) return NoServiceStatusResponse.new if feedHtml.nil? rssFeed = SimpleRSS.parse(feedHtml) if OperatingNormallySpecification.is_satisified_by? rssFeed.items ServiceOkayResponse.new else ServiceErrorResponse.new(rssFeed.items.first[:title]) end end
new(message, state)
click to toggle source
# File lib/src/ServiceStatusResponse.rb, line 7 def initialize(message, state) @message = message @state = state end