Module: CoderCompanion::Languages

Defined in:
lib/codercompanion/languages.rb

Constant Summary collapse

JAVA =
{key: 'Java', annotation_required: false}
RUBY =
{key: 'Ruby', annotation_required: true,  valid_annotation: [CoderCompanion::Ruby::RubyAnnotations::YARD]}
CPP =
{key: 'C++',  annotation_required: false}

Class Method Summary collapse

Class Method Details

.is_supported?(language) ⇒ Boolean

Tells us if a specific language is supported

Parameters:

  • language (String)

    the language to check

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/codercompanion/languages.rb', line 17

def is_supported?(language)
    supported_languages.each {|lang| return true if lang[:key] == language}
    false
end

.supported_languagesArray<Hash>

Returns the supported languages

Returns:

  • (Array<Hash>)


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

def supported_languages
    [JAVA, RUBY] #update this when we support other languages
end