Class: RailsExecution::Services::SyntaxChecker
- Inherits:
-
Object
- Object
- RailsExecution::Services::SyntaxChecker
- Defined in:
- lib/rails_execution/services/syntax_checker.rb
Constant Summary collapse
- OK_MESSAGE =
'Syntax OK'
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(code) ⇒ SyntaxChecker
constructor
A new instance of SyntaxChecker.
Constructor Details
#initialize(code) ⇒ SyntaxChecker
Returns a new instance of SyntaxChecker.
6 7 8 |
# File 'lib/rails_execution/services/syntax_checker.rb', line 6 def initialize(code) @code = code end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'lib/rails_execution/services/syntax_checker.rb', line 10 def call return false if code.blank? init_tempfile return is_ok? end |