Sha256: 994311f3ff29867fde8be29ba5063be5cdf9975e2c14f5abc366a9c39434d28f

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

require 'playground_book_lint/abstract_linter'
require 'playground_book_lint/page_manifest_linter'

module PlaygroundBookLint
  CONTENTS_SWIFT_FILE_NAME = 'Contents.swift'

  class PageLinter < AbstractLinter
    attr_accessor :page_manifest_linter

    def initialize(page_manifest_linter = PageManifestLinter.new())
      @page_manifest_linter = page_manifest_linter
    end

    def lint
      fail_lint "Missing #{CONTENTS_SWIFT_FILE_NAME} in #{Dir.pwd}" unless contents_swift_file_exists?

      page_manifest_linter.lint()
    end

    def contents_swift_file_exists?
      return File.exist? CONTENTS_SWIFT_FILE_NAME
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playground-book-lint-0.0.1 lib/playground_book_lint/page_linter.rb