Sha256: 6e9120cf1c7f3005ee55dd635f1aa1632c66916de03a15226d9a9e55afb1f178

Contents?: true

Size: 755 Bytes

Versions: 14

Compression:

Stored size: 755 Bytes

Contents

module Access
  class Member
    include Access::MuchMeta

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

    def initialize(values)
      @used_fields = []
      set_up_methods(values)
      set_values(values)
      @user  =  Access::User.new(@user) if @user
      @member  = Access::Member.new(@member.tap {|m| m.delete(:user) }) if @member
      @program = Access::Program.new(@program) if @program
      @organization = Access::Organization.new(@organization) if @organization
    end

    def self.show(member_key, options = {})
      Access::Api.new.member_show member_key, options
    end

    def self.update(member_key, options = {})
      Access::Api.new.member_update member_key, options
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
access-2.3.0.pre.rc2 lib/access/member.rb
access-2.3.0.pre.rc1 lib/access/member.rb
access-2.2.0 lib/access/member.rb
access-2.1.5 lib/access/member.rb
access-2.1.4 lib/access/member.rb
access-2.1.3 lib/access/member.rb
access-2.1.2 lib/access/member.rb
access-2.1.1 lib/access/member.rb
access-2.1.0 lib/access/member.rb
access-2.0.55 lib/access/member.rb
access-2.0.54 lib/access/member.rb
access-2.0.53 lib/access/member.rb
access-2.0.52 lib/access/member.rb
access-2.0.51 lib/access/member.rb