Class: Middleman::Presentation::IgnoreFile
- Inherits:
-
Object
- Object
- Middleman::Presentation::IgnoreFile
- Defined in:
- lib/middleman-presentation-core/ignore_file.rb
Overview
The ignore file uses to ignore slides
Instance Method Summary collapse
- #ignore?(slide) ⇒ Boolean
-
#initialize(path) ⇒ IgnoreFile
constructor
A new instance of IgnoreFile.
Constructor Details
#initialize(path) ⇒ IgnoreFile
Returns a new instance of IgnoreFile.
18 19 20 21 22 23 |
# File 'lib/middleman-presentation-core/ignore_file.rb', line 18 def initialize(path) @unignore = @ignore = /^!$/ @path = path parse_file(path) if File.exist? path end |
Instance Method Details
#ignore?(slide) ⇒ Boolean
25 26 27 28 29 |
# File 'lib/middleman-presentation-core/ignore_file.rb', line 25 def ignore?() return false unless File.exist? path .match?(ignore) && !.match?(unignore) end |