Class: Syntaxer::Runner
- Inherits:
-
Object
- Object
- Syntaxer::Runner
- Includes:
- Open3
- Defined in:
- lib/syntaxer/runner.rb
Instance Attribute Summary collapse
-
#exec_rule ⇒ Object
Returns the value of attribute exec_rule.
-
#language ⇒ Object
Returns the value of attribute language.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(exec_rule = nil) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(exec_rule = nil) ⇒ Runner
Returns a new instance of Runner.
9 10 11 |
# File 'lib/syntaxer/runner.rb', line 9 def initialize exec_rule = nil @exec_rule = exec_rule end |
Instance Attribute Details
#exec_rule ⇒ Object
Returns the value of attribute exec_rule.
7 8 9 |
# File 'lib/syntaxer/runner.rb', line 7 def exec_rule @exec_rule end |
#language ⇒ Object
Returns the value of attribute language.
7 8 9 |
# File 'lib/syntaxer/runner.rb', line 7 def language @language end |
Class Method Details
.default(exec_rule) ⇒ Object
23 24 25 26 27 |
# File 'lib/syntaxer/runner.rb', line 23 def default exec_rule c = self.new(exec_rule) c.extend(Runners::Default) c end |
.javascript ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/syntaxer/runner.rb', line 14 def javascript lambda do c = Syntaxer::Runner.new c.language = 'javascript' # it is using for backward compatibility c.extend(Runners::Javascript) c end end |