Class: Prmd::RakeTasks::Verify

Inherits:
Base
  • Object
show all
Defined in:
lib/prmd/rake_tasks/verify.rb

Overview

Schema Verify rake task

Examples:

Prmd::RakeTasks::Verify.new do |t|
  t.files << 'schema/api.json'
end

Instance Attribute Summary collapse

Attributes inherited from Base

#name, #options

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Verify #initialize(options) ⇒ Verify

Creates a new task with name name.

Overloads:

  • #initialize(name) ⇒ Verify

    Parameters:

    • (String)
  • #initialize(options) ⇒ Verify

    Parameters:

    • options (Hash<Symbol, Object>)

      .option [Array<String>] files schema files to verify


27
28
29
30
31
# File 'lib/prmd/rake_tasks/verify.rb', line 27

def initialize(*args, &block)
  options = legacy_parameters(*args)
  @files = options.fetch(:files) { [] }
  super options, &block
end

Instance Attribute Details

#filesArray<String>

Schema files that should be verified

Returns:

  • (Array<String>)

    list of files


18
19
20
# File 'lib/prmd/rake_tasks/verify.rb', line 18

def files
  @files
end