CGI 클래스
CGI 클래스
Ruby 4.0부터 CGI는 여러 인코딩(escape) 메서드를 담아 두는 작은 그릇 역할을 해요. 실제 메서드들은 CGI::Escape 모듈에서 가져와요.
출처: Ruby 4.0 API
본문
Ruby 4.0부터 CGI는 CGI::Escape에서 포함해 온 다양한 인코딩 메서드를 모아 두는 작은 컨테이너예요.
require 'cgi/escape'
CGI.escape("Ruby programming language")
#=> "Ruby+programming+language"
CGI.escapeURIComponent("Ruby programming language")
#=> "Ruby%20programming%20language"
메서드 목록과 각각의 설명은 CGI::Escape 모듈을 보면 돼요.