Class: SirvRestApi::FileMeta
- Inherits:
-
Object
- Object
- SirvRestApi::FileMeta
- Defined in:
- lib/sirv_rest_api/models.rb
Overview
File metadata
Instance Attribute Summary collapse
-
#approved ⇒ Object
Returns the value of attribute approved.
-
#description ⇒ Object
Returns the value of attribute description.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ FileMeta
constructor
A new instance of FileMeta.
- #to_h ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ FileMeta
Returns a new instance of FileMeta.
141 142 143 144 145 146 |
# File 'lib/sirv_rest_api/models.rb', line 141 def initialize(data = {}) @title = data["title"] @description = data["description"] @tags = data["tags"] @approved = data["approved"] end |
Instance Attribute Details
#approved ⇒ Object
Returns the value of attribute approved.
139 140 141 |
# File 'lib/sirv_rest_api/models.rb', line 139 def approved @approved end |
#description ⇒ Object
Returns the value of attribute description.
139 140 141 |
# File 'lib/sirv_rest_api/models.rb', line 139 def description @description end |
#tags ⇒ Object
Returns the value of attribute tags.
139 140 141 |
# File 'lib/sirv_rest_api/models.rb', line 139 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
139 140 141 |
# File 'lib/sirv_rest_api/models.rb', line 139 def title @title end |
Instance Method Details
#to_h ⇒ Object
148 149 150 151 152 153 154 155 |
# File 'lib/sirv_rest_api/models.rb', line 148 def to_h { title: @title, description: @description, tags: @tags, approved: @approved }.compact end |