Skip to content

Commit 08922f6

Browse files
author
Daniel Mendler
committed
unused _class_ instance variables removed
1 parent dd4706e commit 08922f6

File tree

5 files changed

+7
-22
lines changed

5 files changed

+7
-22
lines changed

lib/git/branch.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ class Branch < Path
33

44
attr_accessor :full, :remote, :name
55

6-
@base = nil
7-
@gcommit = nil
8-
@stashes = nil
9-
106
def initialize(base, name)
117
@remote = nil
128
@full = name
139
@base = base
10+
@gcommit = nil
11+
@stashes = nil
1412

1513
parts = name.split('/')
1614
if parts[1]

lib/git/branches.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ module Git
44
class Branches
55
include Enumerable
66

7-
@base = nil
8-
@branches = nil
9-
107
def initialize(base)
118
@branches = {}
129

@@ -48,4 +45,4 @@ def to_s
4845
end
4946

5047
end
51-
end
48+
end

lib/git/remote.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ class Remote < Path
33

44
attr_accessor :name, :url, :fetch_opts
55

6-
@base = nil
7-
86
def initialize(base, name)
97
@base = base
108
config = @base.lib.config_remote(name)
@@ -39,4 +37,4 @@ def to_s
3937
end
4038

4139
end
42-
end
40+
end

lib/git/stashes.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ module Git
44
class Stashes
55
include Enumerable
66

7-
@base = nil
8-
@stashes = nil
9-
107
def initialize(base)
118
@stashes = []
129

@@ -44,4 +41,4 @@ def [](index)
4441
end
4542

4643
end
47-
end
44+
end

lib/git/status.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ module Git
33
class Status
44
include Enumerable
55

6-
@base = nil
7-
@files = nil
8-
96
def initialize(base)
107
@base = base
118
construct_status
@@ -56,9 +53,7 @@ class StatusFile
5653
attr_accessor :path, :type, :stage, :untracked
5754
attr_accessor :mode_index, :mode_repo
5855
attr_accessor :sha_index, :sha_repo
59-
60-
@base = nil
61-
56+
6257
def initialize(base, hash)
6358
@base = base
6459
@path = hash[:path]
@@ -111,4 +106,4 @@ def construct_status
111106

112107
end
113108

114-
end
109+
end

0 commit comments

Comments
 (0)