Sha256: de77fadf932ad0b01947fe8d5cbc8bc0b74533822e6075a4f29c641d9e6db14e

Contents?: true

Size: 714 Bytes

Versions: 4

Compression:

Stored size: 714 Bytes

Contents

module Access
  class Report

    def self.all_usage(options = {})
      # Internal Admin only Call
      Access::Api.new.all_usage options
    end

    def self.usage(options = {})
      # Internal Admin only Call
      Access::Api.new.usage options
    end

    def self.usage_other(key, options = {})
      # Internal Admin only Call
      Access::Api.new.usage_other key, options
    end

    def self.process_batch(chunk)
      chunk.map { |data| new(data) }
    end

    def initialize(values)
      self.class.class_eval {attr_reader *values.keys }
      values.each do |attribute_name, attribute_value|
        self.instance_variable_set("@#{attribute_name}", attribute_value)
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
access-2.0.4 lib/access/report.rb
access-2.0.3 lib/access/report.rb
access-2.0.2 lib/access/report.rb
access-2.0.1 lib/access/report.rb