Sha256: e6f0c1d232b5b76e1f9ff1f4103857f02684b53112721071a404ab0d8dd9c0e0

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 Bytes

Contents

# Service modules the +Service+ class depends on.
def service_modules
  Dir[File.expand_path("../service/*.rb", __FILE__)]
end

service_modules.each { |file| require file }

module Hexx

  # Base class for service objects.
  class Service
    include Messages, Parameters, Transactions, Validations, Callbacks

    # Runs the service object.
    #
    # The method must be defined in a specific service class,
    # inherited from <tt>Hexx::Service</tt>.
    #
    def run
      fail NotImplementedError.new "#{ self.class.name }#run not implemented."
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hexx-2.2.0 lib/hexx/service.rb
hexx-2.1.0 lib/hexx/service.rb