Module: RailsCredentialsCustomKey
- Defined in:
- lib/rails_credentials_custom_key.rb,
lib/rails_credentials_custom_key/version.rb
Defined Under Namespace
Modules: EncryptedFileExtention
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.custom ⇒ Object
Returns the value of attribute custom.
Class Method Summary collapse
Class Attribute Details
.custom ⇒ Object
Returns the value of attribute custom.
7 8 9 |
# File 'lib/rails_credentials_custom_key.rb', line 7 def custom @custom end |
Class Method Details
.init!(&block) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rails_credentials_custom_key.rb', line 14 def init!(&block) return unless required? raise ArgumentError, "no block given" if block.nil? self.custom = block ActiveSupport::EncryptedFile.prepend(EncryptedFileExtention) end |
.required? ⇒ Boolean
9 10 11 12 |
# File 'lib/rails_credentials_custom_key.rb', line 9 def required? Rails.const_defined?(:Command) && Rails::Command.const_defined?(:CredentialsCommand) end |