Parent

Included Modules

Color::RGB::JP::Base::ColorName

Attributes

const_name[R]

Public Class Methods

encoded_attr_reader(internal_encoding, *attributes) click to toggle source
# File lib/color/rgb/jp/base/color_name.rb, line 8
def self.encoded_attr_reader(internal_encoding, *attributes)
  attributes.each do |attr|
    class_eval %{
      def #{attr}(encoding = "#{internal_encoding}")
        encode_to(encoding, "#{internal_encoding}", @#{attr})
      end
    }
  end
end
new(const_name, kanji, hiragana, katakana = nil, romaji = nil) click to toggle source
# File lib/color/rgb/jp/base/color_name.rb, line 21
def initialize(const_name, kanji, hiragana, katakana = nil, romaji = nil)
  @const_name = const_name
  @kanji = kanji
  @hiragana = hiragana
  @katakana = katakana
  @romaji = romaji
end

Public Instance Methods

names(encoding = Encode::INTERNAL_ENCODING) click to toggle source
# File lib/color/rgb/jp/base/color_name.rb, line 33
def names(encoding = Encode::INTERNAL_ENCODING)
  %(kanji hiragana katakana romaji).map{|e| self.__send__(e, encoding) }
end
Also aliased as: to_a
to_a(encoding = Encode::INTERNAL_ENCODING) click to toggle source
Alias for: names
to_s() click to toggle source
# File lib/color/rgb/jp/base/color_name.rb, line 29
def to_s
  romaji
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.