Class: Gumdrop::SitefileDSL
- Inherits:
-
Object
- Object
- Gumdrop::SitefileDSL
- Defined in:
- lib/gumdrop/site.rb
Instance Method Summary collapse
- #configure(&block) ⇒ Object
- #content_filter(&block) ⇒ Object
- #generate(&block) ⇒ Object
- #ignore(path) ⇒ Object (also: #greylist, #graylist)
-
#initialize(site) ⇒ SitefileDSL
constructor
A new instance of SitefileDSL.
- #skip(path) ⇒ Object (also: #blacklist)
- #view_helpers(&block) ⇒ Object
Constructor Details
#initialize(site) ⇒ SitefileDSL
Returns a new instance of SitefileDSL.
235 236 237 |
# File 'lib/gumdrop/site.rb', line 235 def initialize(site) @site= site end |
Instance Method Details
#configure(&block) ⇒ Object
263 264 265 266 267 268 269 |
# File 'lib/gumdrop/site.rb', line 263 def configure(&block) if block.arity > 0 block.call @site.config else @site.config.instance_eval &block end end |
#content_filter(&block) ⇒ Object
244 245 246 |
# File 'lib/gumdrop/site.rb', line 244 def content_filter(&block) @site.content_filters << block end |
#generate(&block) ⇒ Object
239 240 241 242 |
# File 'lib/gumdrop/site.rb', line 239 def generate(&block) # Auto-generated, numerical, key for a site-level generator @site.generators[@site.generators.keys.length] = Generator.new(block, @site) end |
#ignore(path) ⇒ Object Also known as: greylist, graylist
253 254 255 |
# File 'lib/gumdrop/site.rb', line 253 def ignore(path) @site.greylist << path end |
#skip(path) ⇒ Object Also known as: blacklist
248 249 250 |
# File 'lib/gumdrop/site.rb', line 248 def skip(path) @site.blacklist << path end |
#view_helpers(&block) ⇒ Object
259 260 261 |
# File 'lib/gumdrop/site.rb', line 259 def view_helpers(&block) Gumdrop::ViewHelpers.class_eval &block end |