Class: RubyExpectationsHook

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

Instance Method Summary collapse

Instance Method Details

#compile_content(source) ⇒ Object



10
11
12
13
14
# File 'lib/expectations_hook.rb', line 10

def compile_content(source)
  Mulang::Ruby.parse(source)
rescue => e
  raise Mumukit::CompilationError, e
end

#default_smell_exceptionsObject



16
17
18
# File 'lib/expectations_hook.rb', line 16

def default_smell_exceptions
  LOGIC_SMELLS + FUNCTIONAL_SMELLS + %w(HasWrongCaseBindings)
end

#domain_languageObject



20
21
22
23
24
25
26
# File 'lib/expectations_hook.rb', line 20

def domain_language
  {
    caseStyle: 'RubyCase',
    minimumIdentifierSize: 3,
    jargon: []
  }
end

#languageObject



6
7
8
# File 'lib/expectations_hook.rb', line 6

def language
  'Mulang'
end