Method: UEncode::AttrSetting#set_attributes
- Defined in:
- lib/uencode.rb
#set_attributes(options) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/uencode.rb', line 20 def set_attributes() # self.class.const_get("ATTRIBUTES").each { |attr| instance_variable_set(:"@#{attr}", options[attr.to_sym] || options[attr.to_s]) } # options.each do |key, value| .each_pair { |key, value| if self.class.const_get("ATTRIBUTES").include?(key) instance_variable_set(:"@#{key}", value) else self.send("#{key}=", value) end } end |