Sha256: 2324393ca8111da7ce805c785df562eb0b6d35e37841754abb7923804357763e

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

class Web < Abstract      
  def asset_paths *relative_paths
    relative_paths = relative_paths.first if relative_paths.first.is_a? Array
    relative_paths.each do |relative_path|
      path = "#{dir}/#{relative_path}"
      rad.assets.paths << path unless rad.assets.paths.include? path
    end
  end
  
  def load_paths *relative_paths
    relative_paths = relative_paths.first if relative_paths.first.is_a? Array
    relative_paths.each do |relative_path|
      path = "#{dir}/#{relative_path}"
      $LOAD_PATH << path unless $LOAD_PATH.include? path
    end
  end
  
  def template_paths *relative_paths
    rad.template
    
    relative_paths = relative_paths.first if relative_paths.first.is_a? Array
    relative_paths.each do |relative_path|
      path = "#{dir}/#{relative_path}"
      rad.template.paths << path unless rad.template.paths.include? path
    end
  end
  
  def autoload_paths *relative_paths
    relative_paths = relative_paths.first if relative_paths.first.is_a? Array        
    relative_paths.each{|d| autoload_dir "#{dir}/#{d}", true}
  end      
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rad_ext-0.0.6 lib/rad/configurators/web.rb
rad_ext-0.0.5 lib/rad/configurators/web.rb
rad_ext-0.0.4 lib/rad/configurators/web.rb
rad_ext-0.0.3 lib/rad/configurators/web.rb
rad_ext-0.0.2 lib/rad/configurators/web.rb
rad_ext-0.0.1 lib/rad/configurators/web.rb