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.2.9 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.8 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.7 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.6 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.5 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.4 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.3 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.2 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.1 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.0 contents/takahashi/sample_prog/question/7_1.org
ruby_learner-1.2.0 contents/questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.15 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.15 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.14 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.14 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.13 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.13 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.11 takahashi/sample_prog/question/7_1.org
ruby_learner-1.1.11 questions/sequential_check/section_7/part_1/lib/sentence.org
ruby_learner-1.1.10 questions/sequential_check/section_7/part_1/lib/sentence.org