Sha256: bbb86c4d8e4e3768a8641e3e4ee7520d26c0185a73d30edeb247dc105053206a

Contents?: true

Size: 737 Bytes

Versions: 13

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Online < Base
        def as_json
          {
            last_login: last_login,
            last_logout: last_logout,
            logins: logins,
            online: online
          }
        end

        def last_login
          last_login = options['last_login']

          parse_datetime_with_timezone(last_login) if last_login
        end

        def last_logout
          last_logout = options['last_logout']

          parse_datetime_with_timezone(last_logout) if last_logout
        end

        def logins
          options['logins']
        end

        def online
          options['online']
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/models/online.rb
eve_online-0.28.0 lib/eve_online/esi/models/online.rb
eve_online-0.27.0 lib/eve_online/esi/models/online.rb
eve_online-0.26.0 lib/eve_online/esi/models/online.rb
eve_online-0.25.0 lib/eve_online/esi/models/online.rb
eve_online-0.24.0 lib/eve_online/esi/models/online.rb
eve_online-0.23.0 lib/eve_online/esi/models/online.rb
eve_online-0.22.0 lib/eve_online/esi/models/online.rb
eve_online-0.21.0 lib/eve_online/esi/models/online.rb
eve_online-0.20.0 lib/eve_online/esi/models/online.rb
eve_online-0.19.0 lib/eve_online/esi/models/online.rb
eve_online-0.18.0 lib/eve_online/esi/models/online.rb
eve_online-0.17.0 lib/eve_online/esi/models/online.rb