Module: Ronin::Static

Public Visibility

Public Class Method Summary

directory(path)

Adds the path to the Set of static directories.

Returns: String

static_dirs

Returns: Set

Public Class Method Details

directory

public String directory(path)

Adds the path to the Set of static directories.

Meta Tags

Example:

  Static.directory(File.join(File.dirname(__FILE__),'..','..','..','static'))

Parameters:

[String] path

The path to add to static_dirs.

Returns:

[String]

The fully qualified form of the specified path.

Raises:

[RuntimeError]

The specified path is not a directory.

[View source]


47
48
49
50
51
52
53
54
55
56
# File 'lib/ronin/static/static.rb', line 47

def Static.directory(path)
  path = File.expand_path(path)

  unless File.directory?(path)
    raise(RuntimeError,"#{path.dump} must be a directory")
  end

  Static.static_dirs << path
  return path
end

static_dirs

public Set static_dirs

Meta Tags

Returns:

[Set]

The directories which contain static content.

[View source]


29
30
31
# File 'lib/ronin/static/static.rb', line 29

def Static.static_dirs
  @@ronin_static_dirs ||= Set[]
end
Generated on Friday, September 25 2009 at 02:57:10 PM by YARD 0.2.3.5 (ruby-1.8.6).