Class: Glaemscribe::API::PrePostProcessorOperator
- Inherits:
-
Object
- Object
- Glaemscribe::API::PrePostProcessorOperator
show all
- Defined in:
- lib/api/transcription_pre_post_processor.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
30
31
32
|
# File 'lib/api/transcription_pre_post_processor.rb', line 30
def initialize(raw_args)
@raw_args = raw_args
end
|
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
27
28
29
|
# File 'lib/api/transcription_pre_post_processor.rb', line 27
def args
@args
end
|
#raw_args ⇒ Object
Returns the value of attribute raw_args.
28
29
30
|
# File 'lib/api/transcription_pre_post_processor.rb', line 28
def raw_args
@raw_args
end
|
Instance Method Details
#apply ⇒ Object
50
51
52
|
# File 'lib/api/transcription_pre_post_processor.rb', line 50
def apply
raise "Pure virtual method, should be overloaded."
end
|
#eval_arg(arg, trans_options) ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/api/transcription_pre_post_processor.rb', line 34
def eval_arg(arg, trans_options)
return nil if arg.nil?
if arg =~ /^\\eval\s/
to_eval = $'
return Eval::Parser.new().parse(to_eval, trans_options)
end
return arg
end
|
#finalize(trans_options) ⇒ Object
43
44
45
46
47
48
|
# File 'lib/api/transcription_pre_post_processor.rb', line 43
def finalize(trans_options)
@args = []
@raw_args.each{ |arg|
@args << eval_arg(arg, trans_options)
}
end
|