Sha256: 8bad74edd68826800300a3775d1f90d2914205bac16eb891a0e94bfa67ba47c8

Contents?: true

Size: 568 Bytes

Versions: 8

Compression:

Stored size: 568 Bytes

Contents

# Deducer.new(path)
#
#   @deducer.functions.each do |function_name|
#     @deducer.handler_for(function_name)
#   end
#
# Implements:
#
#   functions
#   handler_for(function_name)
#   js_path
#
class Jets::Builders
  class SharedDeducer < Deducer
    def initialize(fun)
      @fun = fun
    end

    def functions
      [@fun.meth] # function_names
    end

    # dont need function_name arg but keeping the same interface as parent class
    def handler_for(function_name)
      @fun.handler_dest
    end

    def js_path
      @fun.handler_dest
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jets-0.10.4 lib/jets/builders/shared_deducer.rb
jets-0.10.3 lib/jets/builders/shared_deducer.rb
jets-0.10.2 lib/jets/builders/shared_deducer.rb
jets-0.10.1 lib/jets/builders/shared_deducer.rb
jets-0.10.0 lib/jets/builders/shared_deducer.rb
jets-0.9.2 lib/jets/builders/shared_deducer.rb
jets-0.9.1 lib/jets/builders/shared_deducer.rb
jets-0.9.0 lib/jets/builders/shared_deducer.rb