Class: Playgroundbook::ContentsLinter

Inherits:
AbstractLinter show all
Defined in:
lib/linter/contents_linter.rb

Overview

A linter for verifying the contents directory of a playground book

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractLinter

#fail_lint, #message

Constructor Details

#initialize(root_manfiest_linter = RootManifestLinter.new) ⇒ ContentsLinter

Returns a new instance of ContentsLinter.



9
10
11
# File 'lib/linter/contents_linter.rb', line 9

def initialize(root_manfiest_linter = RootManifestLinter.new)
  @root_manfiest_linter = root_manfiest_linter
end

Instance Attribute Details

#root_manfiest_linterObject

Returns the value of attribute root_manfiest_linter.



7
8
9
# File 'lib/linter/contents_linter.rb', line 7

def root_manfiest_linter
  @root_manfiest_linter
end

Instance Method Details

#lintObject



13
14
15
16
17
18
# File 'lib/linter/contents_linter.rb', line 13

def lint
  Dir.chdir "Contents" do
    root_manfiest_linter.lint
    # TODO: Other linting?
  end
end