Sha256: 0e8bc015f541464d8d2247b8504d332843e892217e49062dcec91d8d33cf9c28

Contents?: true

Size: 1.26 KB

Versions: 2

Compression:

Stored size: 1.26 KB

Contents

module EveOnline
  module ESI
    module Models
      class Attributes < Base
        def as_json
          {
            charisma: charisma,
            intelligence: intelligence,
            memory: memory,
            perception: perception,
            willpower: willpower,
            bonus_remaps: bonus_remaps,
            last_remap_date: last_remap_date,
            accrued_remap_cooldown_date: accrued_remap_cooldown_date
          }
        end

        def charisma
          options['charisma']
        end

        def intelligence
          options['intelligence']
        end

        def memory
          options['memory']
        end

        def perception
          options['perception']
        end

        def willpower
          options['willpower']
        end

        def bonus_remaps
          options['bonus_remaps']
        end

        def last_remap_date
          last_remap_date = options['last_remap_date']

          parse_datetime_with_timezone(last_remap_date) if last_remap_date
        end

        def accrued_remap_cooldown_date
          accrued_remap_cooldown_date = options['accrued_remap_cooldown_date']

          parse_datetime_with_timezone(accrued_remap_cooldown_date) if accrued_remap_cooldown_date
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.14.0 lib/eve_online/esi/models/attributes.rb
eve_online-0.13.0 lib/eve_online/esi/models/attributes.rb