class Gumdrop::Generator::DSL

Attributes

params[R]

Public Class Methods

new(generator) click to toggle source
# File lib/gumdrop/generator.rb, line 82
def initialize(generator)
  @generator= generator
  @params= Util::HashObject.new
end

Public Instance Methods

config() click to toggle source
# File lib/gumdrop/generator.rb, line 91
def config
  site.config
end
content(name, opts={}, &block)
Alias for: page
data() click to toggle source
# File lib/gumdrop/generator.rb, line 87
def data
  site.data
end
env() click to toggle source
# File lib/gumdrop/generator.rb, line 99
def env
  site.env
end
file(name, opts={}, &block) click to toggle source
# File lib/gumdrop/generator.rb, line 119
def file(name, opts={}, &block)
  opts[:layout]= opts[:layout] || false
  page name, opts, &block
end
get(var_name) click to toggle source
# File lib/gumdrop/generator.rb, line 110
def get(var_name)
  @params[var_name]
end
mode() click to toggle source
# File lib/gumdrop/generator.rb, line 103
def mode
  site.mode
end
options() click to toggle source
# File lib/gumdrop/generator.rb, line 95
def options
  site.options
end
page(name, opts={}, &block) click to toggle source
# File lib/gumdrop/generator.rb, line 114
def page(name, opts={}, &block)
  @generator.gen_page name, opts, @params, &block
end
Also aliased as: content
set(var_name, value) click to toggle source
# File lib/gumdrop/generator.rb, line 107
def set(var_name, value)
  @params[var_name]= value
end