Sha256: 468ccde0b73bef65e70b40e2b53c4fd95bcd79687d94050f2386c2bb6927931f

Contents?: true

Size: 525 Bytes

Versions: 25

Compression:

Stored size: 525 Bytes

Contents

module Isomorfeus
  module Puppetmaster
    class ConsoleMessage
      def initialize(message_hash = {})
        @message_hash = message_hash ? message_hash : {}
      end

      def method_missing(name, *args)
        if %i[column_number level location line_number text].include?(name)
          @message_hash[name.to_s]
        elsif %i[location url].include?(name)
          @message_hash['location'] ? @message_hash['location']['url'] : ''
        else
          super(name, *args)
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
isomorfeus-puppetmaster-0.5.5 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.5.4 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.5.3 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.5.2 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.5.1 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.5.0 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.4.1 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.4.0 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.5 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.4 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.3 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.2 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.1 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.3.0 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.9 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.8 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.7 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.6 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.5 lib/isomorfeus/puppetmaster/console_message.rb
isomorfeus-puppetmaster-0.2.4 lib/isomorfeus/puppetmaster/console_message.rb