Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/docu_sign/extensions.rb
Instance Method Summary collapse
Instance Method Details
#alias_attribute(new_name, old_name) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/docu_sign/extensions.rb', line 2 def alias_attribute(new_name, old_name) module_eval <<-STR, __FILE__, __LINE__ + 1 def #{new_name}; self.#{old_name}; end # def subject; self.title; end def #{new_name}?; self.#{old_name}?; end # def subject?; self.title?; end def #{new_name}=(v); self.#{old_name} = v; end # def subject=(v); self.title = v; end STR end |