0
0
Loading version...
🔄 Update App
🔍 Check for Updates
Test Notification
🔔 Enable Notifications
📰 Fetch NHK News
🚀 Fetch TechCrunch News
🧪 Experiment
📰 Article Management
📚 Reading List
🎤 Speaking List
📊 Statistics
💻 Software Statistics
Push Admin
Edit Reading
Back to List
Basic Information
Title
Please enter a title.
URL
Please enter a valid URL.
Date
カテゴリID
画像ファイル名
統計情報
単語数:
368語
読了回数:
0回
作成日:
2022/04/05 11:52
更新日:
2025/12/09 17:11
本文
本文
Ruby (programming language) programming language Language Download PDF Watch Edit Not to be confused with Ruby on Rails. Ruby is the name of a programming language that was created in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. Like other programming languages, such as Python, its structure (the way it works) is very similar to the English language. It has these qualities: Terse. Short, but still easy to understand. Dynamic. Easy to change, anytime and anywhere. Duck typing. If you think you understand it, you probably understand it. Ruby Ruby logo.svg Paradigm multi-paradigm: object-oriented, imperative, functional, reflective Designed by Yukihiro Matsumoto Developer Yukihiro Matsumoto, et al. First appeared 1995 Stable release 3.1.1[1] Edit this on Wikidata / 18 February 2022; 30 days ago Typing discipline duck, dynamic Scope lexical, sometimes dynamic OS Cross-platform License Ruby License or BSD License[2][3] Filename extensions .rb, .rbw Website www.ruby-lang.org Major implementations Ruby MRI, YARV, Rubinius, MagLev, JRuby, MacRuby, RubyMotion, HotRuby, IronRuby, mruby Influenced by Ada,[4] C++,[4] CLU,[5] Dylan,[5] Eiffel,[4] Lisp,[5] Perl,[5] Python,[5] Smalltalk[5] Influenced D,[6] Elixir, Falcon, Fancy,[7] Groovy, Ioke,[8] Mirah, Nu,[9] Reia, Crystal Ruby Programming at Wikibooks Many programmers like it because the creator tried to make it easy and nice to use.[10] Ruby on Rails (RoR) is a web application framework that is implemented using the Ruby language.[11] Example Edit An example Hello World program in Ruby: puts "Hello World!" An example program in Ruby that asks for your name and then says it: puts "What's your name?" name = gets.chomp puts "Ah hello there, #{name}" A function in Ruby that joins the 2 strings (or arrays/integers) into one, removes all numbers from it, capitalizes the string and then repeats it 5 times: def somefunction(arg1, arg2) # creates a function with 2 arguments. the args can be called anything arg = arg1 + arg2 # this joins them into 1 string arg = arg.tr("1234567890","") # this replaces all the numbers with a nothing. erases them essentially. arg = arg.capitalize # read that out loud 5.times do # read that out loud too puts arg # prints it on a new line end end somefunction("h1e2l6lo7,"," W5o6r8l9d!3") # does the function Output: Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!
本文を入力してください。
メモ
メモ・感想
キャンセル
更新
Debug Info:
Saved State:
-
Redirected Flag:
-
Current URL:
-
Refresh
Close
Debug
Send Report
Send Report
Draw Arrow
Clear
Message:
Cancel
Send