Class: GitHook::Hooks::RubySyntaxCheck::Parser
- Inherits:
-
Ripper
- Object
- Ripper
- GitHook::Hooks::RubySyntaxCheck::Parser
- Defined in:
- lib/git_hook/hooks/ruby_syntax_check.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#warns ⇒ Object
readonly
Returns the value of attribute warns.
Instance Method Summary collapse
- #compile_error(msg) ⇒ Object
-
#initialize(*args) ⇒ Parser
constructor
A new instance of Parser.
- #warn(msg, *args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Parser
Returns a new instance of Parser.
26 27 28 29 30 |
# File 'lib/git_hook/hooks/ruby_syntax_check.rb', line 26 def initialize(*args) super(*args) @errors = [] @warns = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
31 32 33 |
# File 'lib/git_hook/hooks/ruby_syntax_check.rb', line 31 def errors @errors end |
#warns ⇒ Object (readonly)
Returns the value of attribute warns.
31 32 33 |
# File 'lib/git_hook/hooks/ruby_syntax_check.rb', line 31 def warns @warns end |
Instance Method Details
#compile_error(msg) ⇒ Object
33 34 35 |
# File 'lib/git_hook/hooks/ruby_syntax_check.rb', line 33 def compile_error(msg) @errors.push(msg) end |
#warn(msg, *args) ⇒ Object
37 38 39 |
# File 'lib/git_hook/hooks/ruby_syntax_check.rb', line 37 def warn(msg, *args) @warns.push(msg) end |