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.
14 15 16 |
# File 'lib/fountain/secure_document.rb', line 14 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw document data
9 10 11 |
# File 'lib/fountain/secure_document.rb', line 9 def raw_data @raw_data end |
Instance Method Details
#filename ⇒ Object
Filename
34 35 36 |
# File 'lib/fountain/secure_document.rb', line 34 def filename raw_data['filename'] end |
#friendly_name ⇒ Object
FriendlyName
29 30 31 |
# File 'lib/fountain/secure_document.rb', line 29 def friendly_name raw_data['friendly_name'] end |
#id ⇒ Object
Secure document ID
19 20 21 |
# File 'lib/fountain/secure_document.rb', line 19 def id raw_data['id'] end |
#inspect ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/fountain/secure_document.rb', line 53 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
24 25 26 |
# File 'lib/fountain/secure_document.rb', line 24 def name raw_data['name'] end |
#public_url ⇒ Object
Public URL
39 40 41 |
# File 'lib/fountain/secure_document.rb', line 39 def public_url raw_data['public_url'] end |
#size ⇒ Object
Size
44 45 46 |
# File 'lib/fountain/secure_document.rb', line 44 def size raw_data['size'] end |