Module: Apotomo::JavascriptGenerator::Prototype

Defined in:
lib/apotomo/javascript_generator.rb

Instance Method Summary collapse

Instance Method Details

#element(id) ⇒ Object


27
# File 'lib/apotomo/javascript_generator.rb', line 27

def element(id);            "jQuery(\"#{id}\")"; end

#prototypeObject


26
# File 'lib/apotomo/javascript_generator.rb', line 26

def prototype;              end

#replace(id, markup) ⇒ Object


29
# File 'lib/apotomo/javascript_generator.rb', line 29

def replace(id, markup);    element(id) + '.replace("'+escape(markup)+'");'; end

#replace_id(id, markup) ⇒ Object


31
# File 'lib/apotomo/javascript_generator.rb', line 31

def replace_id(id, markup); replace(id, markup); end

#update(id, markup) ⇒ Object


28
# File 'lib/apotomo/javascript_generator.rb', line 28

def update(id, markup);     element(id) + '.update("'+escape(markup)+'");'; end

#update_id(id, markup) ⇒ Object


30
# File 'lib/apotomo/javascript_generator.rb', line 30

def update_id(id, markup);  update(id, markup); end