Module: Card::Mod::Loader
- Defined in:
- lib/card/mod/loader.rb
Class Method Summary collapse
- .load_chunks ⇒ Object
- .load_layouts ⇒ Object
- .load_mods ⇒ Object
- .mod_dirs ⇒ Object
- .refresh_script_and_style ⇒ Object
Class Method Details
.load_chunks ⇒ Object
26 27 28 29 30 |
# File 'lib/card/mod/loader.rb', line 26 def load_chunks mod_dirs.each(:chunk) do |dir| load_dir dir end end |
.load_layouts ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/card/mod/loader.rb', line 32 def load_layouts hash = {} mod_dirs.each(:layout) do |dirname| Dir.foreach(dirname) do |filename| next if filename =~ /^\./ layout_name = filename.gsub(/\.html$/, "") hash[layout_name] = File.read File.join(dirname, filename) end end hash end |
.load_mods ⇒ Object
20 21 22 23 24 |
# File 'lib/card/mod/loader.rb', line 20 def load_mods load_set_patterns load_formats load_sets end |