Class: Packnga::YARDTask

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/packnga/yard-task.rb

Overview

This class creates YARD task. YARD task generates references by YARD.

Since:

  • 0.9.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec) ⇒ YARDTask

Returns a new instance of YARDTask.

Since:

  • 0.9.0



49
50
51
52
53
54
55
56
57
# File 'lib/packnga/yard-task.rb', line 49

def initialize(spec)
  @spec = spec
  @hooks = []
  @readme = nil
  @text_files = nil
  @base_dir = nil
  @options = []
  @source_files = nil
end

Instance Attribute Details

#base_dirString

This attribute is used to set path of base directory of document.

Returns:

  • (String)

    path of base directory of document

Since:

  • 0.9.0



35
36
37
# File 'lib/packnga/yard-task.rb', line 35

def base_dir
  @base_dir
end

#optionsArray<String>

Returns custom yardoc command line options.

Returns:

  • (Array<String>)

    custom yardoc command line options

Since:

  • 0.9.0



46
47
48
# File 'lib/packnga/yard-task.rb', line 46

def options
  @options
end

#readmeString

This attribute is used to set README file to yardoc task.

Returns:

  • (String)

    path of readme file

Since:

  • 0.9.0



31
32
33
# File 'lib/packnga/yard-task.rb', line 31

def readme
  @readme
end

#source_filesArray<String>

This attribute is used to set source files for document.

Returns:

  • (Array<String>)

    target source files

Since:

  • 0.9.0



39
40
41
# File 'lib/packnga/yard-task.rb', line 39

def source_files
  @source_files
end

#text_filesObject

Since:

  • 0.9.0



43
44
45
# File 'lib/packnga/yard-task.rb', line 43

def text_files
  @text_files
end

Instance Method Details

#before_define(&hook) ⇒ Object

Regists yardoc parameters with block.

Since:

  • 0.9.0



71
72
73
# File 'lib/packnga/yard-task.rb', line 71

def before_define(&hook)
  @hooks << hook
end

#defineObject

Since:

  • 0.9.0



65
66
67
68
# File 'lib/packnga/yard-task.rb', line 65

def define
  set_default_values
  define_tasks
end