Class: Thingiverse::Images
- Inherits:
-
Object
- Object
- Thingiverse::Images
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/thingiverse/images.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sizes ⇒ Object
Returns the value of attribute sizes.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(attributes = {}) ⇒ Images
constructor
A new instance of Images.
Constructor Details
#initialize(attributes = {}) ⇒ Images
Returns a new instance of Images.
7 8 9 10 11 |
# File 'lib/thingiverse/images.rb', line 7 def initialize(attributes={}) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/thingiverse/images.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/thingiverse/images.rb', line 6 def name @name end |
#sizes ⇒ Object
Returns the value of attribute sizes.
6 7 8 |
# File 'lib/thingiverse/images.rb', line 6 def sizes @sizes end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/thingiverse/images.rb', line 6 def url @url end |
Instance Method Details
#attributes ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/thingiverse/images.rb', line 13 def attributes { :id => id, :name => name, :url => url, :sizes => sizes } end |