Sha256: bdb974f0f5a8f141a0356920492b6c407464520d493a036fe1d5b4d99b29d501

Contents?: true

Size: 666 Bytes

Versions: 2

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class ServerStatus < Base
        def as_json
          {
            players: players,
            server_version: server_version,
            start_time: start_time,
            vip: vip,
          }
        end

        def players
          options["players"]
        end

        def server_version
          options["server_version"]
        end

        def start_time
          start_time = options["start_time"]

          parse_datetime_with_timezone(start_time) if start_time
        end

        def vip
          options["vip"]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.31.0 lib/eve_online/esi/models/server_status.rb
eve_online-0.30.0 lib/eve_online/esi/models/server_status.rb