Class: TracePreprocessor::Preprocessor
- Inherits:
-
Object
- Object
- TracePreprocessor::Preprocessor
- Defined in:
- lib/trace_preprocessor/preprocessor.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
Returns the value of attribute language.
-
#preprocessor_file_name ⇒ Object
Returns the value of attribute preprocessor_file_name.
Instance Method Summary collapse
-
#initialize(language, preprocessor_file_name) ⇒ Preprocessor
constructor
A new instance of Preprocessor.
- #run(input_file_name, output_file_name) ⇒ Object
Constructor Details
#initialize(language, preprocessor_file_name) ⇒ Preprocessor
Returns a new instance of Preprocessor.
6 7 8 9 |
# File 'lib/trace_preprocessor/preprocessor.rb', line 6 def initialize language, preprocessor_file_name @language = language @preprocessor_file_name = preprocessor_file_name end |
Instance Attribute Details
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/trace_preprocessor/preprocessor.rb', line 3 def language @language end |
#preprocessor_file_name ⇒ Object
Returns the value of attribute preprocessor_file_name.
4 5 6 |
# File 'lib/trace_preprocessor/preprocessor.rb', line 4 def preprocessor_file_name @preprocessor_file_name end |
Instance Method Details
#run(input_file_name, output_file_name) ⇒ Object
11 12 13 14 15 |
# File 'lib/trace_preprocessor/preprocessor.rb', line 11 def run input_file_name, output_file_name if @language == :c `#{preprocessor_file_name} < #{input_file_name} > #{output_file_name}` end end |