-
Notifications
You must be signed in to change notification settings - Fork 0
/
puts "Happy" + today + "! It is the " + day_of_year.to_s + " day of the year."
100 lines (100 loc) · 2.4 KB
/
puts "Happy" + today + "! It is the " + day_of_year.to_s + " day of the year."
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
puts "I would like to visit" + vacation_spot
vacation_spots.each do |vacation_spot|
puts "I would like to visit " + vacation_spot
rails_klass = ["Kinsey", "Emma", "Lauren", "Morgan"]
rails_klass.each do |rails_klass|
puts "My name is " == "Kinsey"
p person
p person == "Kinsey"
p "My Name is " if person == "Kinsey"
rails_klass.each do |person|
p "My Name is #{person} " if person == "Kinsey"
person = "Kinsey"
"hi im " + person
"hi im #{person}"
'this is a string with single quotes'
'this is a string with single quotes #{person}'
"this is a string with single quotes #{person}"
load 'my_program.rb'
second_time=Sample.new
second_time.hello
hello.rb
ruby hello.rb Alice
frank.make_toast
frank.make_milkshake
jeeves.open_front_door
frank.make_toast('not burnt')
frank.make_toast('burnt')
frank.make_milkshake('Oreo')
jeeves = Butler.new
jeeves.open_door('back')
frank.make_toast('burnt').make_eggs(5).make_milkshake('chocolate')
load 'personal_chef.rb'
frank = PersonalChef.new
frank.make_toast('burnt').make_pancakes(5).make_milkshake('chocolate')
greeting = "Hello fellow coders!"
greeting.length
greeting.gsub("fellow coders!","amigas!")
today = "Saturday"
require 'date'
puts "Happy" + today + "!"
puts "Happy " + today + "!"
puts "Happy " + today + "! It is the
puts "Happy " + today + "! It is the " + day_of_year + " day ofthe year."
today = Date.today.strftime("%A")
day_of_year = Date.today.yday
puts "Happy" + today + "! It is the " + day_of_year.to_s + " day of the year."
puts "Happy #{today}! It is the +{day_of_year} day of the year."
puts "Happy #{today}! It is the +{day_of_year} day of the year."
puts "Happy #{today}! It is the #{day_of_year} day of the year."
modifier = "very "
mood = "excited"
puts "I am #{modifier * 3 + mood} for today's class!"
1 + 2
require "active_support"
1 + 1
def code_to_write
1+1
irb
3 + 3
7 * 6
my_variable = 5
mkdir railsbridge
signup
Signup.create(email: params[:email])
Signup.create([email protected]))
Signup.create([email protected])
reload!
Signup.create(email: "[email protected]")
Signup
Signup.count
Signup.pluck(:email)
exit
Comment
response.all
yes.all
people.all
People.all
Comments.all
Comment.all
Yes.all
Response.all
Email.all
Emails.all
Signup.all
Post.all
puts "Hello wombat"
hash = { "front => "cat"}
hash = { "front" => "cat" }
hash["front"]
class Card
end
card = Card.new
Card
card1
card.front = "Cat"
load 'flashcards.rb'
card.front
card.front = Cat
card.front
exit