class EY::Serverside::Callbacks::Hooks::Base

Attributes

callback_name[R]
flavor[R]
path[R]

Public Class Methods

new(file_path) click to toggle source
# File lib/engineyard-serverside/callbacks/hooks/base.rb, line 11
def initialize(file_path)
  @path = Pathname.new(file_path)

  filename = path.basename

  callback = filename.basename('.rb')

  @flavor = filename == callback ? :executable : :ruby

  @callback_name = callback.to_s.to_sym
end

Public Instance Methods

matches?(callback) click to toggle source
# File lib/engineyard-serverside/callbacks/hooks/base.rb, line 23
def matches?(callback)
  callback_name == callback
end
read() click to toggle source
# File lib/engineyard-serverside/callbacks/hooks/base.rb, line 27
def read
  path.read
end
short_name() click to toggle source
# File lib/engineyard-serverside/callbacks/hooks/base.rb, line 35
def short_name
  raise "Unimplemented"
end
to_s() click to toggle source
# File lib/engineyard-serverside/callbacks/hooks/base.rb, line 31
def to_s
  raise "Unimplemented"
end