module PoiseApplication::ServiceMixin::Resource::ClassMethods
Public Instance Methods
included(klass)
click to toggle source
@api private
Calls superclass method
# File lib/poise_application/service_mixin.rb, line 73 def included(klass) super klass.extend(ClassMethods) klass.class_exec do attribute(:path, kind_of: String, name_attribute: true) # Redefines from the PoiseService version so we get a better default. attribute(:service_name, kind_of: String, default: lazy { PoiseService::Utils.parse_service_name(path) }) attribute(:user, kind_of: [String, Integer], default: lazy { parent ? parent.owner : 'root' }) end end