Class: GobstonesExpectationsHook
- Inherits:
-
Mumukit::Templates::MulangExpectationsHook
- Object
- Mumukit::Templates::MulangExpectationsHook
- GobstonesExpectationsHook
- Defined in:
- lib/expectations_hook.rb
Instance Method Summary collapse
- #compile_expectations(request) ⇒ Object
- #default_smell_exceptions ⇒ Object
-
#mulang_code(request) ⇒ Object
no need to implement ‘language` and `compile_content` since we are completly overriding `mulang_code`.
Instance Method Details
#compile_expectations(request) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/expectations_hook.rb', line 10 def compile_expectations(request) super(request).tap do |expectations| request.precompiled_batch.[:subject].try do |subject| expectations[:ast] << { binding: '*', inspection: "Declares:=#{subject}" } end end end |
#default_smell_exceptions ⇒ Object
18 19 20 |
# File 'lib/expectations_hook.rb', line 18 def default_smell_exceptions LOGIC_SMELLS + FUNCTIONAL_SMELLS + OBJECT_ORIENTED_SMELLS end |
#mulang_code(request) ⇒ Object
no need to implement ‘language` and `compile_content` since we are completly overriding `mulang_code`
6 7 8 |
# File 'lib/expectations_hook.rb', line 6 def mulang_code(request) Mulang::Code.external extract_ast(request) end |