Module: Cyberweb::JqueryModule
- Defined in:
- lib/cyberweb/jquery_module/jquery_module.rb
Overview
Cyberweb::JqueryModule
Class Method Summary collapse
-
.extended(i) ⇒ Object
# === Cyberweb::JqueryModule.extended.
Instance Method Summary collapse
-
#disable_jquery ⇒ Object
# === enable_jquery ========================================================================= #.
-
#enable_jquery ⇒ Object
# === enable_jquery ========================================================================= #.
-
#use_jquery? ⇒ Boolean
# === use_jquery? ========================================================================= #.
Class Method Details
.extended(i) ⇒ Object
#
Cyberweb::JqueryModule.extended
Whenever this module is included, jquery will be enabled automatically.
#
24 25 26 27 |
# File 'lib/cyberweb/jquery_module/jquery_module.rb', line 24 def self.extended(i) i.enable_jquery if i.respond_to?(:enable_jquery) # Enable it automatically when extending. # puts "#{i} was included." end |
Instance Method Details
#disable_jquery ⇒ Object
#
enable_jquery
#
32 33 34 |
# File 'lib/cyberweb/jquery_module/jquery_module.rb', line 32 def disable_jquery @internal_hash[:use_jquery] = false end |
#enable_jquery ⇒ Object
#
enable_jquery
#
39 40 41 |
# File 'lib/cyberweb/jquery_module/jquery_module.rb', line 39 def enable_jquery @internal_hash[:use_jquery] = true end |
#use_jquery? ⇒ Boolean
#
use_jquery?
#
46 47 48 |
# File 'lib/cyberweb/jquery_module/jquery_module.rb', line 46 def use_jquery? @internal_hash[:use_jquery] end |