private Method

Element.initialize_variables(attrs)

There's no documentation for this item.

Source Code

# File rss/rss.rb, line 651
def initialize_variables(attrs)
  normalized_attrs = {}
  attrs.each do |key, value|
    normalized_attrs[key.to_s] = value
  end
  self.class.need_initialize_variables.each do |variable_name|
    value = normalized_attrs[variable_name.to_s]
    if value
      __send__("#{variable_name}=", value)
    else
      instance_eval("@#{variable_name} = nil")
    end
  end
  initialize_have_children_elements
  @content = "" if self.class.have_content?
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.