Module: ANTLR3::Test::DependantFile
- Included in:
- Grammar
- Defined in:
- lib/antlr3/test/grammar.rb
Constant Summary collapse
- GLOBAL_DEPENDENCIES =
[]
Instance Attribute Summary collapse
-
#force ⇒ Object
(also: #force?)
Returns the value of attribute force.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#force ⇒ Object Also known as: force?
Returns the value of attribute force.
18 19 20 |
# File 'lib/antlr3/test/grammar.rb', line 18 def force @force end |
#path ⇒ Object
Returns the value of attribute path.
18 19 20 |
# File 'lib/antlr3/test/grammar.rb', line 18 def path @path end |
Instance Method Details
#dependencies ⇒ Object
23 24 25 |
# File 'lib/antlr3/test/grammar.rb', line 23 def dependencies @dependencies ||= GLOBAL_DEPENDENCIES.clone end |
#depends_on(path) ⇒ Object
27 28 29 30 31 |
# File 'lib/antlr3/test/grammar.rb', line 27 def depends_on( path ) path = File. path.to_s dependencies << path if test( ?f, path ) return path end |
#stale? ⇒ Boolean
33 34 35 36 37 38 39 |
# File 'lib/antlr3/test/grammar.rb', line 33 def stale? force and return( true ) target_files.any? do |target| not test( ?f, target ) or dependencies.any? { |dep| test( ?>, dep, target ) } end end |