Module: JqueryMockjaxRails
- Defined in:
- lib/jquery_mockjax_rails.rb,
lib/jquery_mockjax_rails/engine.rb,
lib/jquery_mockjax_rails/helper.rb,
lib/jquery_mockjax_rails/version.rb,
lib/jquery_mockjax_rails/jquery_mockjax_rails.rb
Defined Under Namespace
Modules: Helper
Classes: Engine
Constant Summary
collapse
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
.clean ⇒ Object
11
12
13
|
# File 'lib/jquery_mockjax_rails/jquery_mockjax_rails.rb', line 11
def clean
stubs = []
end
|
.js_output ⇒ Object
19
20
21
22
23
|
# File 'lib/jquery_mockjax_rails/jquery_mockjax_rails.rb', line 19
def js_output
stubs.inject('') do |result, stub|
"#{result}jQuery.mockjax(#{stub.to_json})\n"
end
end
|
.js_path ⇒ Object
15
16
17
|
# File 'lib/jquery_mockjax_rails/jquery_mockjax_rails.rb', line 15
def js_path
@js_path ||= '/assets/jquery.mockjax.js'
end
|
.stub(args) ⇒ Object
3
4
5
|
# File 'lib/jquery_mockjax_rails/jquery_mockjax_rails.rb', line 3
def stub args
stubs << args
end
|
.stubs ⇒ Object
7
8
9
|
# File 'lib/jquery_mockjax_rails/jquery_mockjax_rails.rb', line 7
def stubs
@stubs ||= []
end
|