1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ruby variable and method

Posted at

概要

ruby における変数及び関数のまとめ

Ruby における変数

Ruby における変数は、python のように型を宣言する必要がなく以下のように扱う

name = 'Rudy'

Ruby における関数

Ruby における関数(method)は、以下のように扱う。method においては、0個以上の引数を取るものとする。

def hello name
puts "Hello #{name}."
end

name =ARGV[0]
hello(name)

  • source ~/grad_members_20f/members/FumiyaToyoda/variable_method.org
1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?