Sha256: 804147c543d065bf8c4f11c6945eb7270d83b7d5e3dd76d3bca79c93d476be78

Contents?: true

Size: 578 Bytes

Versions: 4

Compression:

Stored size: 578 Bytes

Contents

module Smite
  class MatchSummary < Smite::Object
    def initialize(data)
      super
      @data = DataTransform.transform_gods(@data)
      @data = DataTransform.transform_items(@data)
      @data = DataTransform.transform_match_summary(@data)
    end

    def to_full_match
      Smite::Game.match(match)
    end
    alias_method :full_match, :to_full_match

    def win?
      win_status == 'Win'
    end

    def loss?
      !win?
    end

    def id
      match
    end

    def inspect
      "#<Smite::MatchSummary #{match} '#{queue}' (#{win_status})>"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smite_ruby-1.5.1 lib/smite/match_summary.rb
smite_ruby-1.5.0 lib/smite/match_summary.rb
smite_ruby-1.4.9 lib/smite/match_summary.rb
smite_ruby-1.4.6 lib/smite/match_summary.rb