[RUBY] puts method

puts method

** A method provided in Ruby that outputs a value to a terminal. ** ** If you write a value after puts, that value will be output to the terminal.

[Example] puts method


name = "Taro"

#Output to terminal
puts name

[Example] Terminal


#The value of name is output
=> "Taro"

Edit the ruby file as follows.

Now let's actually write the code. Edit the ruby file as follows.

ruby file


input = "Hello"

puts "The value you entered is#{input}is"

Summary

** The puts method is a method that outputs values to the terminal. ** **

that's all.

Recommended Posts

puts method
Method
Java method
java (method)
merge method
Map method
include method
Abstract method
initialize method
List method
Java method
Class method
save! method
getParameter method
[Java] method
private method
rails method
[Java] method
Ruby print puts p printf output method
Ruby to_s method
Screen transition method
Binary search binary search method
Method to search
Exception switching method
RxSwift method chain
Rails delegate method
scan method problem
Java8 method reference
[Ruby] end_with? method
[Ruby] Method memorandum
[HTTP method PATCH]
About the method
[Java] forEach method
[Practice] Map method
[Servlet] Basic method
variable and method
Binary search method
Template Method pattern
Template Method Pattern
0-filled (non-zero) method
JavaSilver11 study method
keycloak test-skip method
Factory Method pattern
[Ruby] initialize method
Ruby build method
undefined method `** _ path'error
java8 method reference
[Java] Random method
Ruby accessor method
[Java] split method
ruby map method