Class: CanvasCc::CanvasCC::Models::CanvasFile
- Defined in:
- lib/canvas_cc/canvas_cc/models/canvas_file.rb
Constant Summary collapse
- WEB_RESOURCES =
'web_resources'
Constants inherited from Resource
Instance Attribute Summary collapse
-
#file_location ⇒ Object
Returns the value of attribute file_location.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#lock_at ⇒ Object
Returns the value of attribute lock_at.
-
#locked ⇒ Object
Returns the value of attribute locked.
-
#unlock_at ⇒ Object
Returns the value of attribute unlock_at.
-
#usage_rights ⇒ Object
Returns the value of attribute usage_rights.
Attributes inherited from Resource
#dependencies, #files, #href, #identifier, #type
Instance Method Summary collapse
-
#initialize ⇒ CanvasFile
constructor
A new instance of CanvasFile.
- #license ⇒ Object
Methods inherited from Resource
Constructor Details
#initialize ⇒ CanvasFile
Returns a new instance of CanvasFile.
9 10 11 12 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 9 def initialize super @type = WEB_CONTENT_TYPE end |
Instance Attribute Details
#file_location ⇒ Object
Returns the value of attribute file_location.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def file_location @file_location end |
#file_path ⇒ Object
Returns the value of attribute file_path.
6 7 8 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 6 def file_path @file_path end |
#hidden ⇒ Object
Returns the value of attribute hidden.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def hidden @hidden end |
#lock_at ⇒ Object
Returns the value of attribute lock_at.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def lock_at @lock_at end |
#locked ⇒ Object
Returns the value of attribute locked.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def locked @locked end |
#unlock_at ⇒ Object
Returns the value of attribute unlock_at.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def unlock_at @unlock_at end |
#usage_rights ⇒ Object
Returns the value of attribute usage_rights.
7 8 9 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 7 def usage_rights @usage_rights end |
Instance Method Details
#license ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/canvas_cc/canvas_cc/models/canvas_file.rb', line 20 def license case usage_rights when 'own_copyright', 'used_by_permission', 'fair_use' 'private' else usage_rights end end |