Class: Ohmage::Document
- Inherits:
-
Object
- Object
- Ohmage::Document
- Defined in:
- lib/ohmage/entity/document.rb
Instance Attribute Summary collapse
- #campaign_role ⇒ Hash readonly
- #class_role ⇒ Hash readonly
- #description ⇒ String readonly
- #last_modified ⇒ String readonly
- #name ⇒ String readonly
- #privacy_state ⇒ String readonly
- #size ⇒ String readonly
- #urn ⇒ String (also: #id) readonly
- #user_max_role ⇒ String readonly
- #user_role ⇒ String readonly
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(attrs = {}) ⇒ Document
Returns a new instance of Document.
9 10 11 12 13 14 |
# File 'lib/ohmage/entity/document.rb', line 9 def initialize(attrs = {}) @urn = attrs.keys[0].to_s attrs.values[0].each do |k, v| instance_variable_set("@#{k}", v) end end |
Instance Attribute Details
#campaign_role ⇒ Hash (readonly)
7 8 9 |
# File 'lib/ohmage/entity/document.rb', line 7 def campaign_role @campaign_role end |
#class_role ⇒ Hash (readonly)
7 8 9 |
# File 'lib/ohmage/entity/document.rb', line 7 def class_role @class_role end |
#description ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def description @description end |
#last_modified ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def last_modified @last_modified end |
#name ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def name @name end |
#privacy_state ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def privacy_state @privacy_state end |
#size ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def size @size end |
#urn ⇒ String (readonly) Also known as: id
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def urn @urn end |
#user_max_role ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def user_max_role @user_max_role end |
#user_role ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/document.rb', line 4 def user_role @user_role end |