Skip to content

Commit

Permalink
Merge pull request #151 from fartem/refactoring-2
Browse files Browse the repository at this point in the history
2023-01-08 v. 1.0.8.1: small refactoring
  • Loading branch information
fartem authored Jul 8, 2023
2 parents 63fecde + 2bd1de8 commit 62b9506
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion leetcode-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require 'English'
::Gem::Specification.new do |s|
s.required_ruby_version = '>= 3.0'
s.name = 'leetcode-ruby'
s.version = '1.0.8'
s.version = '1.0.8.1'
s.license = 'MIT'
s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE]
s.executable = 'leetcode-ruby'
Expand Down
4 changes: 2 additions & 2 deletions lib/common/binary_tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Binary Tree implementation for this project
class TreeNode
attr_accessor :val, :left, :right

# @param val {Integer}
# @param left {TreeNode}
# @param right {TreeNode}
Expand All @@ -16,8 +18,6 @@ def ==(other)
are_equals(self, other)
end

attr_accessor :val, :left, :right

private

# @param curr {TreeNode}
Expand Down
4 changes: 2 additions & 2 deletions lib/common/linked_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# LinkedList implementation for this project
class ListNode
attr_accessor :val, :next

# @param val {Integer}
# @param nxt {ListNode}
def initialize(val = 0, nxt = nil)
Expand Down Expand Up @@ -30,6 +32,4 @@ def self.are_equals(first, second)

first.val == second.val && are_equals(first.next, second.next)
end

attr_accessor :val, :next
end

0 comments on commit 62b9506

Please sign in to comment.