Sha256: 958a179b6aaaca9313ddb94f2b3d888965c20aaaf7a53d3fdbd7b7fdbc5523ae

Contents?: true

Size: 511 Bytes

Versions: 39

Compression:

Stored size: 511 Bytes

Contents

1つの引数を受け取り、シンボルに変換して表示するプログラムを作成せよ。


- シンボル

文字列に似たオブジェクトで、Rubyがメソッドなどの名前を識別するためのラベルをオブジェクトにしたもの。
先頭に「:」をつけて表現する。


- to_symメソッド

文字列.to_sym

文字列をシンボルに変換するためのメソッド。
逆に、シンボルを文字列に変換するには、to_sメソッドを用いる。

Version data entries

39 entries across 24 versions & 1 rubygems

Version Path
ruby_learner-1.1.10 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.9 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.9 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.8 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.8 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.7 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.7 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.6 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.6 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.5 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.5 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.4 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.4 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.3 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.3 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.2 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.2 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.1 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.1 questions/sequential_check/section_7/part_1/lib/sentence.org