Module: Backup::Configuration::Attributes

Included in:
Adapter, AdapterOptions, Base, Mail, SMTP, Storage
Defined in:
lib/backup/configuration/attributes.rb

Instance Method Summary collapse

Instance Method Details

#generate_attributes(*attrs) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/backup/configuration/attributes.rb', line 5

def generate_attributes(*attrs)
  define_method :attributes do
    @attributes ||= {}
  end
  
  attrs.flatten.each do |att|
    define_method att do |value|
      self.attributes[att.to_s] = value
    end
  end
end