Sha256: 5e669332278a9b54f7618b3180005df634c10a82b266586e075441bbf50e54d4
Contents?: true
Size: 800 Bytes
Versions: 4
Compression:
Stored size: 800 Bytes
Contents
# # This file is part of the brauser gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>. # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # module Brauser module Definitions # A definition of a language. # # @attribute [r] code # @return [String] The language code. # @attribute [r] name # @return [String] The language name. class Language < Base attr_reader :code, :name # Creates a new definition. # # @param code [String] The language code. # @param name [String] The language name. def initialize(code, name, **_) code = code.downcase.gsub("_", "-") @id = code.to_sym @code = code @name = name end end end end
Version data entries
4 entries across 4 versions & 1 rubygems