-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pin rubocop gems and 0.x gems more aggressively * Update rubocop sub-gems * Remove redundant block / length based configs now rubocop-rspec and rubocop are updated * Partially fix up small param name cop * Regen of config / todo config * Update changelog * Fix issue with cs feature copied incorrectly * Fix pending spec * Fix bug with finnish translation of push that was missed during refactor
- Loading branch information
Showing
43 changed files
with
296 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def جمع | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ def initialize | |
end | ||
|
||
def push(arg) | ||
@stack.push arg | ||
@stack.push(arg) | ||
end | ||
|
||
def result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculadora | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class Lommeregner | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Calculador | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
def initialize | ||
@stack = [] | ||
end | ||
|
||
def push(arg) | ||
@stack.push(arg) | ||
end | ||
|
||
def add | ||
@args.inject(0) { |n, sum| sum + n } | ||
@stack.inject(0) { |n, sum| sum + n } | ||
end | ||
|
||
def divide | ||
@args[0].to_f / @args[1] | ||
@stack[0].to_f / @stack[1] | ||
end | ||
end |
Oops, something went wrong.