シンタックスハイライト

コードを追加する時

 1 class Person
 2   def initialize(name)
 3     @name = name
 4   end
 5 
 6   def hello
 7     "Hello, friend!\nMy name is #{@name}!"
 8   end
 9 end
10 
11 charlie = Person.new('Charlie')
12 puts charlie.hello
13 
14 # >> Hello, friend!
15 # >> My name is Charlie!

Comments

blog comments powered by Disqus