Sha256: 1808763aafac4698bc95395d3bc622efd21102b510be62c1b1a757152e7b46e4
Contents?: true
Size: 666 Bytes
Versions: 23
Compression:
Stored size: 666 Bytes
Contents
module Castronaut class TicketResult InvalidMessageCategories = %w{warn error fatal invalid} attr_reader :ticket, :message, :message_category delegate :username, :proxies, :to => :ticket def initialize(ticket, message=nil, message_category=nil) @ticket = ticket @message = message @message_category = message_category Castronaut.logger.info("#{self.class} - #{@message_category} #{@message} for #{@ticket}") if @message && @ticket end def valid? !invalid? end def invalid? InvalidMessageCategories.any?{ |cat| message_category.to_s.downcase.include?(cat) } end end end
Version data entries
23 entries across 23 versions & 4 rubygems
Version | Path |
---|---|
relevance-castronaut-0.7.4 | lib/castronaut/ticket_result.rb |
relevance-castronaut-0.7.5 | lib/castronaut/ticket_result.rb |
factorylabs-castronaut-0.7.5 | lib/castronaut/ticket_result.rb |