Sha256: 2cf7a0b1ed1eb2e27e62a5b1da43ae57dcbbeb4cce10fbac59e7140120ed72ad

Contents?: true

Size: 1.19 KB

Versions: 41

Compression:

Stored size: 1.19 KB

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.member_query_frequent(member, options = {})
      Access::Api.new.member_query_frequent member, options
    end

    def self.member_query_recent(member, options = {})
      Access::Api.new.member_query_recent member, options
    end

    def self.member_location_frequent(member, options = {})
      Access::Api.new.member_location_frequent member, options
    end

    def self.member_location_recent(member, options = {})
      Access::Api.new.member_location_recent member, 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

41 entries across 41 versions & 1 rubygems

Version Path
access-2.0.5 lib/access/report.rb