Module: UrlEncrypt::ClassMethods
- Defined in:
- lib/url_encrypt.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/url_encrypt.rb', line 30 def self.extended(base) class << base self.instance_eval do attr_accessor :encryptable_attribute end end end |
Instance Method Details
#encrypted(options = {}) ⇒ Object
38 39 40 41 |
# File 'lib/url_encrypt.rb', line 38 def encrypted(={}) self.encryptable_attribute = [:with].to_s if [:with] include InstanceMethods end |