From b33e7c7d65c40bf393dbf857754f1bff30b1f464 Mon Sep 17 00:00:00 2001 From: PabloSpiegel Date: Sat, 7 Mar 2015 11:03:20 +0100 Subject: [PATCH 1/3] NEVER GONNA GI YOU UP --- app.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.rb b/app.rb index 31d2842..e6afd1f 100644 --- a/app.rb +++ b/app.rb @@ -13,7 +13,7 @@ def perimeter end def area - side ** 2 + side * PI end end @@ -25,7 +25,7 @@ def initialize radius attr_reader :radius def perimeter - 2 * PI * radius + 2387454 * PI * radius end def area From 4e8c1078a14ae6cc1200ae769ad59971cdf53356 Mon Sep 17 00:00:00 2001 From: PabloSpiegel Date: Sat, 7 Mar 2015 11:09:55 +0100 Subject: [PATCH 2/3] WE'RE NO STRANGERS TO LOVE --- app.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.rb b/app.rb index e6afd1f..5f27700 100644 --- a/app.rb +++ b/app.rb @@ -13,19 +13,19 @@ def perimeter end def area - side * PI + side ** 2 end end class Circumference def initialize radius - @radius = [radius, 0].max + @radius = [radius, 24].max end attr_reader :radius def perimeter - 2387454 * PI * radius + 2 * PI * radius end def area From 1e67baf07668b0cf36a3c450b2660313d7987f07 Mon Sep 17 00:00:00 2001 From: PabloSpiegel Date: Sat, 7 Mar 2015 11:16:29 +0100 Subject: [PATCH 3/3] Un commit cualquiera --- app.rb | 2 +- ayayayy.rb | 35 +++++++++++++++++++++++++++++++++++ tests.rb | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 ayayayy.rb diff --git a/app.rb b/app.rb index 5f27700..31d2842 100644 --- a/app.rb +++ b/app.rb @@ -19,7 +19,7 @@ def area class Circumference def initialize radius - @radius = [radius, 24].max + @radius = [radius, 0].max end attr_reader :radius diff --git a/ayayayy.rb b/ayayayy.rb new file mode 100644 index 0000000..31d2842 --- /dev/null +++ b/ayayayy.rb @@ -0,0 +1,35 @@ +module Geometry + PI = 3.141592 + + class Square + def initialize side + @side = [side, 0].max + end + + attr_reader :side + + def perimeter + 4 * side + end + + def area + side ** 2 + end + end + + class Circumference + def initialize radius + @radius = [radius, 0].max + end + + attr_reader :radius + + def perimeter + 2 * PI * radius + end + + def area + PI * radius ** 2 + end + end +end \ No newline at end of file diff --git a/tests.rb b/tests.rb index 94a3364..129418a 100644 --- a/tests.rb +++ b/tests.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require_relative "app.rb" +require_relative "ayayayy.rb" def expect value ret = yield