Class: SirvRestApi::FileMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/sirv_rest_api/models.rb

Overview

File metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#approvedObject

Returns the value of attribute approved.



139
140
141
# File 'lib/sirv_rest_api/models.rb', line 139

def approved
  @approved
end

#descriptionObject

Returns the value of attribute description.



139
140
141
# File 'lib/sirv_rest_api/models.rb', line 139

def description
  @description
end

#tagsObject

Returns the value of attribute tags.



139
140
141
# File 'lib/sirv_rest_api/models.rb', line 139

def tags
  @tags
end

#titleObject

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_hObject



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