class Playgroundbook::PageLinter

A linter for verifying the contents of a page directory

Attributes

page_manifest_linter[RW]

Public Class Methods

new(page_manifest_linter = PageManifestLinter.new) click to toggle source
# File lib/linter/page_linter.rb, line 9
def initialize(page_manifest_linter = PageManifestLinter.new)
  @page_manifest_linter = page_manifest_linter
end

Public Instance Methods

contents_swift_file_exists?() click to toggle source
# File lib/linter/page_linter.rb, line 19
def contents_swift_file_exists?
  File.exist? ContentsSwiftFileName
end
lint() click to toggle source
# File lib/linter/page_linter.rb, line 13
def lint
  fail_lint "Missing #{ContentsSwiftFileName} in #{Dir.pwd}" unless contents_swift_file_exists?

  page_manifest_linter.lint
end