Class: Thingiverse::Files

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/thingiverse/files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Files

Returns a new instance of Files.



7
8
9
10
11
# File 'lib/thingiverse/files.rb', line 7

def initialize(attributes={})
  attributes.each do |name, value|
    send("#{name}=", value)
  end
end

Instance Attribute Details

#download_urlObject

Returns the value of attribute download_url.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def download_url
  @download_url
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def name
  @name
end

#public_urlObject

Returns the value of attribute public_url.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def public_url
  @public_url
end

#threejs_urlObject

Returns the value of attribute threejs_url.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def threejs_url
  @threejs_url
end

#thumbnailObject

Returns the value of attribute thumbnail.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def thumbnail
  @thumbnail
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/thingiverse/files.rb', line 6

def url
  @url
end

Instance Method Details

#attributesObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/thingiverse/files.rb', line 13

def attributes
  {
    :id => id,
    :name => name,
    :thumbnail => thumbnail,
    :url => url,
    :public_url => public_url,
    :threejs_url => threejs_url,
    :download_url => download_url
  }
end