Class: Thingiverse::Users
- Inherits:
-
Object
- Object
- Thingiverse::Users
- Includes:
- DynamicAttributes
- Defined in:
- lib/thingiverse/users.rb
Instance Attribute Summary
Attributes included from DynamicAttributes
Class Method Summary collapse
Methods included from DynamicAttributes
#add_attribute, #eigenclass, #initialize, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Thingiverse::DynamicAttributes
Class Method Details
.find(user_name) ⇒ Object
5 6 7 8 9 |
# File 'lib/thingiverse/users.rb', line 5 def self.find(user_name) response = Thingiverse::Connection.get("/users/#{user_name}") raise "#{response.code}: #{JSON.parse(response.body)['error']}" unless response.success? self.new response.parsed_response end |