Class: GobstonesExpectationsHook

Inherits:
Mumukit::Templates::MulangExpectationsHook
  • Object
show all
Defined in:
lib/expectations_hook.rb

Instance Method Summary collapse

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.options[:subject].try do |subject|
      expectations[:ast] << { binding: '*', inspection: "Declares:=#{subject}" }
    end
  end
end

#default_smell_exceptionsObject



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