Sha256: 5f15d574ddf339c593469f56dcb9ae4c2cbeb5ab18b03634f624d7bb367f323a

Contents?: true

Size: 384 Bytes

Versions: 3

Compression:

Stored size: 384 Bytes

Contents

module JqueryMockjaxRails
  class << self
    def stub args
      stubs << args
    end

    def stubs
      @stubs ||= []
    end

    def clean
      stubs = []
    end

    def js_path
      @js_path ||= '/assets/jquery.mockjax.js'
    end

    def js_output
      stubs.inject('') do |result, stub|
        "#{result}jQuery.mockjax(#{stub.to_json})\n"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jquery_mockjax_rails-0.0.3 lib/jquery_mockjax_rails/jquery_mockjax_rails.rb
jquery_mockjax_rails-0.0.2 lib/jquery_mockjax_rails/jquery_mockjax_rails.rb
jquery_mockjax_rails-0.0.1 lib/jquery_mockjax_rails/jquery_mockjax_rails.rb