Class: Fountain::SecureDocument
- Inherits:
-
Object
- Object
- Fountain::SecureDocument
- Defined in:
- lib/fountain/secure_document.rb
Overview
Fountain Secure Document
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Raw document data.
Instance Method Summary collapse
-
#filename ⇒ Object
Filename.
-
#friendly_name ⇒ Object
FriendlyName.
-
#id ⇒ Object
Secure document ID.
-
#initialize(data) ⇒ SecureDocument
constructor
A new instance of SecureDocument.
- #inspect ⇒ Object
-
#name ⇒ Object
Name.
-
#public_url ⇒ Object
Public URL.
-
#size ⇒ Object
Size.
-
#stage ⇒ Object
Stage.
Constructor Details
#initialize(data) ⇒ SecureDocument
Returns a new instance of SecureDocument.
12 13 14 |
# File 'lib/fountain/secure_document.rb', line 12 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw document data
7 8 9 |
# File 'lib/fountain/secure_document.rb', line 7 def raw_data @raw_data end |
Instance Method Details
#filename ⇒ Object
Filename
32 33 34 |
# File 'lib/fountain/secure_document.rb', line 32 def filename raw_data['filename'] end |
#friendly_name ⇒ Object
FriendlyName
27 28 29 |
# File 'lib/fountain/secure_document.rb', line 27 def friendly_name raw_data['friendly_name'] end |
#id ⇒ Object
Secure document ID
17 18 19 |
# File 'lib/fountain/secure_document.rb', line 17 def id raw_data['id'] end |
#inspect ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/fountain/secure_document.rb', line 51 def inspect format( '#<%<class_name>s:0x%<object_id>p @id="%<id>s" @name="%<name>s">', class_name: self.class.name, object_id: object_id, id: id, name: name ) end |
#name ⇒ Object
Name
22 23 24 |
# File 'lib/fountain/secure_document.rb', line 22 def name raw_data['name'] end |
#public_url ⇒ Object
Public URL
37 38 39 |
# File 'lib/fountain/secure_document.rb', line 37 def public_url raw_data['public_url'] end |
#size ⇒ Object
Size
42 43 44 |
# File 'lib/fountain/secure_document.rb', line 42 def size raw_data['size'] end |