Class: PUNK::SecretWorker
- Defined in:
- lib/punk/workers/secret.rb
Instance Attribute Summary
Attributes included from Validatable
Instance Method Summary collapse
Methods inherited from Worker
Methods inherited from Runnable
args, #method_missing, #respond_to_missing?
Methods included from Validatable
#default_validation_helpers_options, #get_column_value, #valid?, #validates_not_empty
Methods included from Plugins::Validation::InstanceMethods
#validates_email, #validates_event, #validates_phone, #validates_state, #validates_url
Methods inherited from Settings
#method_missing, #respond_to_missing?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PUNK::Runnable
Instance Method Details
#process ⇒ Object
12 13 14 15 16 |
# File 'lib/punk/workers/secret.rb', line 12 def process secret = SecretService.run.result sleep 5 unless PUNK.env.test? logger.info "#{name}: #{secret}" end |
#validate ⇒ Object
7 8 9 10 |
# File 'lib/punk/workers/secret.rb', line 7 def validate validates_not_null :name validates_not_empty :name end |