Class: Prmd::RakeTasks::Combine

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

Overview

Schema combine rake task

Examples:

Prmd::RakeTasks::Combine.new do |t|
  t.options[:meta] = 'schema/meta.json'
  t.paths << 'schema/schemata/api'
  t.output_file = 'schema/api.json'
end

Instance Attribute Summary collapse

Attributes inherited from Base

#name, #options

Instance Method Summary collapse

Constructor Details

#initialize(name = :combine) ⇒ Combine

Creates a new task with name name.

Parameters:

  • name (String, Symbol) (defaults to: :combine)

    the name of the rake task



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

def initialize(name = :combine)
  @paths = []
  super
end

Instance Attribute Details

#output_fileString

target file the combined result should be written

Returns:

  • (String)

    ] target filename



23
24
25
# File 'lib/prmd/rake_tasks/combine.rb', line 23

def output_file
  @output_file
end

#pathsArray<String>

Returns list of paths.

Returns:

  • (Array<String>)

    list of paths



19
20
21
# File 'lib/prmd/rake_tasks/combine.rb', line 19

def paths
  @paths
end