Class: EY::Serverside::Callbacks::Hooks::Service
- Defined in:
- lib/engineyard-serverside/callbacks/hooks/service.rb
Instance Attribute Summary collapse
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
Attributes inherited from Base
#callback_name, #flavor, #path
Instance Method Summary collapse
-
#initialize(file_path) ⇒ Service
constructor
A new instance of Service.
- #short_name ⇒ Object
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(file_path) ⇒ Service
Returns a new instance of Service.
11 12 13 14 |
# File 'lib/engineyard-serverside/callbacks/hooks/service.rb', line 11 def initialize(file_path) super @service_name = path.dirname.basename.to_s end |
Instance Attribute Details
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
9 10 11 |
# File 'lib/engineyard-serverside/callbacks/hooks/service.rb', line 9 def service_name @service_name end |
Instance Method Details
#short_name ⇒ Object
20 21 22 |
# File 'lib/engineyard-serverside/callbacks/hooks/service.rb', line 20 def short_name "#{service_name}/#{callback_name}" end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/engineyard-serverside/callbacks/hooks/service.rb', line 16 def to_s "service/#{service_name}/#{callback_name}" end |