Sha256: 626541ce0bb156f0afa46e24bd7a0ae4fda92094487d441e57bb579ca9d2dabe
Contents?: true
Size: 519 Bytes
Versions: 6
Compression:
Stored size: 519 Bytes
Contents
module Alephant module Broker class Response attr_accessor :content, :content_type attr_reader :status STATUS_CODE_MAPPING = { 200 => 'ok', 404 => 'Not found', 500 => 'Error retrieving content' } def initialize(status = 200) @content_type = "text/html" self.status = status setup end def status=(code) @status = code @content = STATUS_CODE_MAPPING[code] end def setup; end end end end
Version data entries
6 entries across 6 versions & 1 rubygems