From 245159532c4519fe281c70f9e4fa2774abfe09da Mon Sep 17 00:00:00 2001 From: Nathalia Costa Date: Sat, 19 Dec 2020 10:31:37 +0000 Subject: [PATCH] Done. --- Gemfile.lock | 32 ++++++++++++++++++++++++++++++++ lib/if_else_end.rb | 9 ++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..f3e1405 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,32 @@ +GEM + remote: https://rubygems.org/ + specs: + coderay (1.1.3) + diff-lcs (1.4.4) + method_source (1.0.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.0) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.0) + +PLATFORMS + ruby + +DEPENDENCIES + pry + rspec + +BUNDLED WITH + 2.0.1 diff --git a/lib/if_else_end.rb b/lib/if_else_end.rb index 8a7c9d9..79bdbb3 100644 --- a/lib/if_else_end.rb +++ b/lib/if_else_end.rb @@ -1 +1,8 @@ -# Write your solution here \ No newline at end of file +current_time = Time.now +current_time = current_time.to_i + +if current_time % 2 == 0 + puts "Even!" +else + puts "Odd!" +end