Module: Color::RGB::JP::Base::Encode

### Home Classes Methods

### In Files

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

### Methods

- #encode_to
- #with_internal_encoding

### 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::Encode

### Constants

INTERNAL_ENCODING

### Public Instance Methods

encode_to(to, from, value) click to toggle source

    # File lib/color/rgb/jp/base/encode.rb, line 10
    def encode_to(to, from, value)
      return nil if value.nil?
      return value if to.nil?
      return value if from.nil?
      return value if from == to
      return Iconv.iconv(to, from, value)[0]
    end

with_internal_encoding(value, from) click to toggle source

    # File lib/color/rgb/jp/base/encode.rb, line 18
    def with_internal_encoding(value, from)
      yield encode_to(INTERNAL_ENCODING, from, value)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.