Sha256: 34a7132fb82694b3cb8f5ebba45a2f70be5f619c7018a277a259fe00352e131f

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module EveOnline
  module XML
    module Models
      class AccountTypeObject
        STATUSES = { 'Character' => :character, 'Account' => :account,
                     'Corporation' => :corporation }.freeze

        attr_reader :input

        def initialize(input)
          @input = input
        end

        def value
          raise ArgumentError unless STATUSES.key?(input)

          @value ||= STATUSES.fetch(input)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.12.0 lib/eve_online/xml/models/account_type_object.rb