Class: RubyExpectationsHook
- Inherits:
-
Mumukit::Templates::MulangExpectationsHook
- Object
- Mumukit::Templates::MulangExpectationsHook
- RubyExpectationsHook
- Defined in:
- lib/expectations_hook.rb
Instance Method Summary collapse
- #compile_content(source) ⇒ Object
- #default_smell_exceptions ⇒ Object
- #domain_language ⇒ Object
- #language ⇒ Object
- #original_language ⇒ Object
Instance Method Details
#compile_content(source) ⇒ Object
14 15 16 17 18 |
# File 'lib/expectations_hook.rb', line 14 def compile_content(source) Mulang::Ruby.parse(source) rescue => e raise Mumukit::CompilationError, e end |
#default_smell_exceptions ⇒ Object
20 21 22 |
# File 'lib/expectations_hook.rb', line 20 def default_smell_exceptions LOGIC_SMELLS + FUNCTIONAL_SMELLS + %w(HasWrongCaseBindings) end |
#domain_language ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/expectations_hook.rb', line 24 def domain_language { caseStyle: 'RubyCase', minimumIdentifierSize: 3, jargon: [] } end |
#language ⇒ Object
6 7 8 |
# File 'lib/expectations_hook.rb', line 6 def language 'Mulang' end |
#original_language ⇒ Object
10 11 12 |
# File 'lib/expectations_hook.rb', line 10 def original_language 'Ruby' end |