Class: Pixelletter::Base
- Inherits:
-
Object
- Object
- Pixelletter::Base
- Includes:
- AttrOptional, AttrRequired
- Defined in:
- lib/pixelletter/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 11 12 13 |
# File 'lib/pixelletter/base.rb', line 5 def initialize(attributes = {}) if attributes.is_a?(Hash) (required_attributes + optional_attributes).each do |key| value = attributes[key] self.send "#{key}=", value end end attr_missing! end |