Module: MicroService::Client::ClassMethods
- Defined in:
- lib/micro_service/client/class_methods.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/micro_service/client/class_methods.rb', line 6 def self.extended(base) base.send(:attr_accessor, :configuration) base.validates :secret, :presence => true base.validates :install_url, :presence => true, url: true base.after_initialize :initialize_secret base.after_create :after_create_notify_client_service end |
Instance Method Details
#configuration ⇒ Object
14 15 16 |
# File 'lib/micro_service/client/class_methods.rb', line 14 def configuration @configuration end |
#configure {|@configuration| ... } ⇒ Object
18 19 20 21 |
# File 'lib/micro_service/client/class_methods.rb', line 18 def configure @configuration ||= MicroService::Client::Configuration.new yield(@configuration) end |