Sha256: 5283e1632a2965b82a9088254802adf659095632d47f0c7d6a30fe4b10155ac8

Contents?: true

Size: 624 Bytes

Versions: 2

Compression:

Stored size: 624 Bytes

Contents

module AppfluxRuby
  module MessageBuilders
    class DelayedJob

      def initialize options
        @options = options
      end

      def to_hash
        _handler_object = YAML.load(@options['handler'])
        @options[:dj_handler] = _handler_object.inspect
        @options[:object] = _handler_object.object.inspect

        @options[:method_name] = _handler_object.method_name
        @options[:method_arguments] = _handler_object.args
        @options[:display_name] = _handler_object.display_name

        @options
      end

      def self.to_hash options
        new(options).to_hash
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appflux_ruby-0.1.2 lib/appflux_ruby/message_builders/delayed_job.rb
appflux_ruby-0.1.1 lib/appflux_ruby/message_builders/delayed_job.rb