Class: Imgurapi::Base
- Inherits:
-
Object
- Object
- Imgurapi::Base
- Defined in:
- lib/imgurapi/models/base.rb
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(hsh = {}) ⇒ Base
Returns a new instance of Base.
3 4 5 6 7 8 9 10 |
# File 'lib/imgurapi/models/base.rb', line 3 def initialize(hsh = {}) hsh.each do |k, v| singleton_class.class_eval do attr_accessor k end send("#{k}=", v) end end |