method
initialize_variables
v1_8_6_287 -
Show latest stable
- Class:
RSS::Element
initialize_variables(attrs)private
No documentation available.
# File lib/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