Class: S3Secure::Summary::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/s3_secure/summary/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket, properties = {}) ⇒ Item

Returns a new instance of Item.



4
5
6
# File 'lib/s3_secure/summary/item.rb', line 4

def initialize(bucket, properties={})
  @bucket, @properties = bucket, properties
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/s3_secure/summary/item.rb', line 8

def method_missing(name, *args, &block)
  if @properties.key?(name)
    @properties[name]
  else
    super
  end
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



3
4
5
# File 'lib/s3_secure/summary/item.rb', line 3

def bucket
  @bucket
end