class Linguist::Language

Overview

Languages are defined in languages.yml.

Defined in:

lib/linguist/language.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.create(name, color) : Language #

[View source]
def self.new(name : String, color : String | Nil) #

[View source]

Class Method Detail

def self.all : Array(Language) #

Get all Languages


[View source]
def self.colors : Array(Language) #

A List of languages with assigned colors.


[View source]
def self.find_by_name(name : String) : Language | Nil #

Look up Language by its proper name.

Linguist::Language.find_by_name("ruby")
=> #<Linguist::Language:0x7f9f83175e80 @name="Ruby", @color="#701516">

[View source]

Instance Method Detail

def color : String? #

a hex color String


[View source]
def name : String #

[View source]