Class: Rews::Folder::Folder
- Inherits:
-
Object
- Object
- Rews::Folder::Folder
- Defined in:
- lib/rews/folder.rb
Overview
represents a Folder in a mailbox on an Exchange server
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#folder_id ⇒ Object
readonly
Returns the value of attribute folder_id.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#[](key) ⇒ Object
access the
Folder
attributes
. -
#initialize(client, folder) ⇒ Folder
constructor
A new instance of Folder.
- #inspect ⇒ Object
-
#keys ⇒ Object
keys of the
Folder
attributes
.
Constructor Details
#initialize(client, folder) ⇒ Folder
Returns a new instance of Folder.
10 11 12 13 14 |
# File 'lib/rews/folder.rb', line 10 def initialize(client, folder) @client = client @folder_id = VanillaFolderId.new(client, folder[:folder_id]) @attributes = folder end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/rews/folder.rb', line 8 def attributes @attributes end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/rews/folder.rb', line 6 def client @client end |
#folder_id ⇒ Object (readonly)
Returns the value of attribute folder_id.
7 8 9 |
# File 'lib/rews/folder.rb', line 7 def folder_id @folder_id end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/rews/folder.rb', line 16 def ==(other) other.is_a?(Folder) && @client == other.client && @folder_id == other.folder_id && @attributes == other.attributes end |
#[](key) ⇒ Object
access the Folder
attributes
24 25 26 |
# File 'lib/rews/folder.rb', line 24 def [](key) @attributes[key] end |
#inspect ⇒ Object
33 34 35 |
# File 'lib/rews/folder.rb', line 33 def inspect "#<#{self.class} @folder_id=#{@folder_id.inspect}, @attributes=#{@attributes.inspect}>" end |
#keys ⇒ Object
keys of the Folder
attributes
29 30 31 |
# File 'lib/rews/folder.rb', line 29 def keys @attributes.keys end |