Class: Relyze::Library::Archive
- Inherits:
-
Object
- Object
- Relyze::Library::Archive
- Defined in:
- C:/Program Files/Relyze/lib/relyze/core/application.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Get or set this archives description.
-
#name ⇒ Object
Get or set this archives name.
-
#path ⇒ Object
readonly
Get this archives file path.
-
#saved ⇒ Object
readonly
Get the time stamp of when this archive was saved.
Instance Method Summary collapse
-
#add_hash(name, value) ⇒ true, false
Add a hash name/value pair to this archive.
-
#add_tag(name, color = nil) ⇒ true, false
Add a new tag to this archive.
-
#begin_update ⇒ true, false
For performance you can wrap multiple updates to an Archive with begin_update and end_update.
-
#delete ⇒ true, false
Delete this archive from the library as well as its archive file.
-
#encrypted? ⇒ true, false
Returns true if this archive is encrypted or false if it is not.
-
#end_update ⇒ true, false
Every call to begin_update must be met with a call to end_update in order for the modification to the archive to be written to the library.
-
#get_hash(name) ⇒ String
Given a hash name, return the corresponding value.
-
#hash?(name) ⇒ true, false
Determine if this archive contains a hash value for a specific hash name.
-
#hashes {|hash_name, hash_value| ... } ⇒ Array<Array<String>>
Get every hash name and value associated with this archive.
-
#remove_hash(name) ⇒ true, false
Remove a hash name/value pair from this archive.
-
#tag?(name) ⇒ true, false
Check if this archive has this tag name set.
-
#tags ⇒ Array<String>
Get a list of tags for this Archive.
Instance Attribute Details
#description ⇒ Object
Get or set this archives description.
25 26 27 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 25 def description @description end |
#name ⇒ Object
Get or set this archives name.
22 23 24 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 22 def name @name end |
#path ⇒ Object (readonly)
Get this archives file path.
28 29 30 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 28 def path @path end |
#saved ⇒ Object (readonly)
Get the time stamp of when this archive was saved.
31 32 33 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 31 def saved @saved end |
Instance Method Details
#add_hash(name, value) ⇒ true, false
Add a hash name/value pair to this archive.
147 148 149 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 147 def add_hash( name, value ) return false end |
#add_tag(name, color = nil) ⇒ true, false
Add a new tag to this archive.
92 93 94 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 92 def add_tag( name, color=nil ) return false end |
#begin_update ⇒ true, false
For performance you can wrap multiple updates to an Archive with begin_update and end_update.
48 49 50 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 48 def begin_update return false end |
#delete ⇒ true, false
Delete this archive from the library as well as its archive file.
162 163 164 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 162 def delete return false end |
#encrypted? ⇒ true, false
Returns true if this archive is encrypted or false if it is not.
62 63 64 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 62 def encrypted? return false end |
#end_update ⇒ true, false
Every call to begin_update must be met with a call to end_update in order for the modification to the archive to be written to the library.
56 57 58 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 56 def end_update return false end |
#get_hash(name) ⇒ String
Given a hash name, return the corresponding value.
135 136 137 138 139 140 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 135 def get_hash( name ) self.hashes do | hash_name, hash_value | return hash_value if name == hash_name end return nil end |
#hash?(name) ⇒ true, false
Determine if this archive contains a hash value for a specific hash name.
124 125 126 127 128 129 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 124 def hash?( name ) self.hashes do | hash_name, hash_value | return true if name == hash_name end return false end |
#hashes {|hash_name, hash_value| ... } ⇒ Array<Array<String>>
Get every hash name and value associated with this archive.
111 112 113 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 111 def hashes return nil end |
#remove_hash(name) ⇒ true, false
Remove a hash name/value pair from this archive.
155 156 157 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 155 def remove_hash( name ) return false end |
#tag?(name) ⇒ true, false
Check if this archive has this tag name set.
77 78 79 80 81 82 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 77 def tag?( name ) self. do | tag_name | return true if name == tag_name end return false end |
#tags ⇒ Array<String>
Get a list of tags for this Relyze::Library::Archive
69 70 71 |
# File 'C:/Program Files/Relyze/lib/relyze/core/application.rb', line 69 def return nil end |