Class: S33r::S3ACL::Group

Inherits:
Grantee
  • Object
show all
Defined in:
lib/s33r/s3_acl.rb

Overview

One of the predefined S3 groups.

A group must have a type (AllUsers or AuthenticatedUsers).

Instance Attribute Summary collapse

Attributes inherited from Grantee

#grantee_type

Instance Method Summary collapse

Methods inherited from Grantee

#==, from_xml, #method_missing

Constructor Details

#initialize(group_type) ⇒ Group

The type of group. A key from S3_GROUP_TYPES to one of the pre-defined Amazon group types.



298
299
300
301
302
303
304
# File 'lib/s33r/s3_acl.rb', line 298

def initialize(group_type)
  unless S3_GROUP_TYPES.has_key?(group_type)
    raise S3Exception::InvalidGroupType, 'No such group type #{group_type}'
  end
  @group_type = S3_GROUP_TYPES[group_type]
  @grantee_type = GRANTEE_TYPES[:group]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class S33r::S3ACL::Grantee

Instance Attribute Details

#group_typeObject

Returns the value of attribute group_type.



294
295
296
# File 'lib/s33r/s3_acl.rb', line 294

def group_type
  @group_type
end

Instance Method Details

#to_sObject



306
307
308
# File 'lib/s33r/s3_acl.rb', line 306

def to_s
  "Group '#{@group_type}'"
end