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