Method: Rebrandly::Element#initialize

Defined in:
lib/rebrandly/element.rb

#initialize(attrs = {}) ⇒ Element

Returns a new instance of Element.



4
5
6
7
# File 'lib/rebrandly/element.rb', line 4

def initialize(attrs={})
  # Only set the attributes if the method exists, this way we can ignore deprecated attributes
  attrs.each { |k,v| send("#{k.underscore}=", v) if respond_to?("#{k.underscore}=") }
end