Sha256: 5eec0bb64339396250ac3e02b05fb988a22ce16f362c45e6dd98b7b01458e185

Contents?: true

Size: 355 Bytes

Versions: 6

Compression:

Stored size: 355 Bytes

Contents

module Access
  class Member

    def self.process_batch(chunk)
      chunk.map { |member| new(member) }
    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

6 entries across 6 versions & 1 rubygems

Version Path
access-2.0.5 lib/access/member.rb
access-2.0.4 lib/access/member.rb
access-2.0.3 lib/access/member.rb
access-2.0.2 lib/access/member.rb
access-2.0.1 lib/access/member.rb
access-2.0.0 lib/access/member.rb