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

### Home Classes Methods

### In Files

- lib/color/rgb/jp/base/color_name.rb

### Parent

Object

### Methods

- ::encoded_attr_reader
- ::new
- #names
- #to_a
- #to_s

### Included Modules

- Color::RGB::JP::Base::Encode

### Class/Module Index

Quicksearch

- Color
- Color::RGB
- Color::RGB::JP
- Color::RGB::JP::Base
- Color::RGB::JP::Base::ColorName
- Color::RGB::JP::Base::Encode
- Color::RGB::JP::Base::NamedRGB
- Color::RGB::JP::Base::Pallet
- Color::RGB::JP::Compiler
- Color::RGB::JP::Compiler::Command
- Color::RGB::JP::Compiler::Compiler
- Color::RGB::JP::VERSION

No matching classes.

# 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.