Class: Ibex::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/ibex/rake_task.rb

Overview

Declares grammar-to-parser generation in a Rakefile.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &configuration) ⇒ RakeTask

Returns a new instance of RakeTask.



33
34
35
36
37
38
39
40
41
42
# File 'lib/ibex/rake_task.rb', line 33

def initialize(name, &configuration)
  super()
  @name = name
  @grammar = nil
  @output = name.to_s.end_with?(".rb") ? name.to_s : nil
  @options = []
  @action_source = nil
  configuration&.call(self)
  define
end

Instance Attribute Details

#action_sourceObject

: String | true | nil



30
31
32
# File 'lib/ibex/rake_task.rb', line 30

def action_source
  @action_source
end

#grammarObject

: String?



27
28
29
# File 'lib/ibex/rake_task.rb', line 27

def grammar
  @grammar
end

#optionsObject

: Array



29
30
31
# File 'lib/ibex/rake_task.rb', line 29

def options
  @options
end

#outputObject

: String?



28
29
30
# File 'lib/ibex/rake_task.rb', line 28

def output
  @output
end