Class: Bowline::JQuery
Class Method Summary collapse
-
.bind(event, fun, data) ⇒ Object
For binding global events Equivalent to: $(‘body’).bind().
-
.bowline ⇒ Object
Equivalent to: $.bowline.
-
.dollar ⇒ Object
Equivalent to: $.
-
.for_element(el) ⇒ Object
Equivalent to: $(‘#item_id’).
Instance Method Summary collapse
-
#method_missing(sym, args) ⇒ Object
Equivalent to: $.foo().
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, args) ⇒ Object
Equivalent to: $.foo()
4 5 6 |
# File 'lib/bowline/jquery.rb', line 4 def method_missing(sym, args) self.class.dollar.send(sym, *args) end |
Class Method Details
.bind(event, fun, data) ⇒ Object
For binding global events Equivalent to: $(‘body’).bind()
16 17 18 |
# File 'lib/bowline/jquery.rb', line 16 def bind(event, fun, data) for_element("body").bind(event, data, fun) end |
.bowline ⇒ Object
Equivalent to: $.bowline
26 27 28 |
# File 'lib/bowline/jquery.rb', line 26 def bowline dollar.bowline end |