Module: Mockjax
- Defined in:
- lib/mockjax.rb,
lib/mockjax/rails.rb,
lib/mockjax/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
- .cleanup ⇒ Object
- .mock(options) ⇒ Object
- .mocks ⇒ Object
- .path_to_js ⇒ Object
- .path_to_js=(path) ⇒ Object
Class Method Details
.cleanup ⇒ Object
19 20 21 |
# File 'lib/mockjax.rb', line 19 def cleanup @mocks = [] end |
.mock(options) ⇒ Object
10 11 12 13 |
# File 'lib/mockjax.rb', line 10 def mock() @mocks ||= [] @mocks << end |
.mocks ⇒ Object
15 16 17 |
# File 'lib/mockjax.rb', line 15 def mocks @mocks || [] end |
.path_to_js ⇒ Object
27 28 29 |
# File 'lib/mockjax.rb', line 27 def path_to_js @path_to_js || (defined?(::Rails) ? '/assets/jquery.mockjax.js' : 'https://raw.github.com/appendto/jquery-mockjax/master/jquery.mockjax.js') end |
.path_to_js=(path) ⇒ Object
23 24 25 |
# File 'lib/mockjax.rb', line 23 def path_to_js=(path) @path_to_js = path end |