Sha256: 0d661975bd52208f40c7552912fd7d46da03e49650d84c5805ab3b5a5e5c0d32

Contents?: true

Size: 542 Bytes

Versions: 2

Compression:

Stored size: 542 Bytes

Contents

module Transmission
  module Model
    class SessionStats

      attr_accessor :attributes, :connector

      def initialize(session_object, connector)
        @attributes = session_object
        @connector = connector
      end

      class << self
        def get(options = {})
          rpc = options[:connector] || connector
          body = rpc.get_session_stats options[:fields]
          SessionStats.new body, rpc
        end

        def connector
          Transmission::Config.get_connector
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
transmission-rpc-ruby-0.2.1 lib/transmission/model/session_stats.rb
transmission-rpc-ruby-0.2.0 lib/transmission/model/session_stats.rb