Class: Muwu::RenderHtmlPartial::JsLibrary

Inherits:
Object
  • Object
show all
Includes:
Muwu
Defined in:
lib/muwu/render_html_partial/render_js_library.rb

Constant Summary

Constants included from Muwu

GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION

Instance Method Summary collapse

Methods included from Muwu

debug, read

Constructor Details

#initializeJsLibrary

Returns a new instance of JsLibrary.



9
10
11
12
# File 'lib/muwu/render_html_partial/render_js_library.rb', line 9

def initialize
  js_lib_folder = File.join(File.dirname(__FILE__), 'js_library')
  @js_lib_path = File.absolute_path(js_lib_folder)
end

Instance Method Details

#file_initObject



18
19
20
# File 'lib/muwu/render_html_partial/render_js_library.rb', line 18

def file_init
  read_js_lib_file('init.js')
end

#file_navigationObject



23
24
25
# File 'lib/muwu/render_html_partial/render_js_library.rb', line 23

def file_navigation
  read_js_lib_file('navigation.js')
end

#find(symbol) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/muwu/render_html_partial/render_js_library.rb', line 28

def find(symbol)
  case symbol
  when :init
    file_init
  when :navigation
    file_navigation
  end
end