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



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_exceptionsObject



20
21
22
# File 'lib/expectations_hook.rb', line 20

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

#domain_languageObject



24
25
26
27
28
29
30
# File 'lib/expectations_hook.rb', line 24

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

#languageObject



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

def language
  'Mulang'
end

#original_languageObject



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

def original_language
  'Ruby'
end