概要
%iによるシンボル配列の作成
詳細
文字列配列を作成する際は%wが便利ですが、そのシンボル版が%iです。
サンプルコード
# encoding: utf-8 require 'tbpgr_utils' hoges = %i{hoge hige hage} print hoges
出力
[:hoge, :hige, :hage]
%iによるシンボル配列の作成
文字列配列を作成する際は%wが便利ですが、そのシンボル版が%iです。
# encoding: utf-8 require 'tbpgr_utils' hoges = %i{hoge hige hage} print hoges
[:hoge, :hige, :hage]