Class: Pixelletter::Base

Inherits:
Object
  • Object
show all
Includes:
AttrOptional, AttrRequired
Defined in:
lib/pixelletter/base.rb

Direct Known Subclasses

Request, XMLBuilder

Instance Method Summary collapse

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