Class: Rattler::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/rattler/rake_task.rb

Overview

The rake task to generate parser code from a grammar

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = :rattler) {|_self| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
21
22
23
24
25
26
# File 'lib/rattler/rake_task.rb', line 17

def initialize(name = :rattler)
  @name = name
  @grammar = nil
  @rtlr_opts = []
  @verbose = true

  yield self if block_given?

  define_task
end

Instance Attribute Details

#grammarObject

Returns the value of attribute grammar.



13
14
15
# File 'lib/rattler/rake_task.rb', line 13

def grammar
  @grammar
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/rattler/rake_task.rb', line 12

def name
  @name
end

#rtlr_optsObject

Returns the value of attribute rtlr_opts.



14
15
16
# File 'lib/rattler/rake_task.rb', line 14

def rtlr_opts
  @rtlr_opts
end

#verboseObject

Returns the value of attribute verbose.



15
16
17
# File 'lib/rattler/rake_task.rb', line 15

def verbose
  @verbose
end