Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fatmahussein committed Oct 25, 2023
1 parent 87beb6c commit f1acc82
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 79 deletions.
30 changes: 15 additions & 15 deletions classes/author.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
class Author
attr_reader :id, :first_name, :last_name
attr_accessor :items
def initialize(first_name, last_name)
@id = Random.rand(1..1000)
@first_name = first_name
@last_name = last_name
@items = []
end
def add_item(item)
item.author = self
@items << item
end
end
attr_reader :id, :first_name, :last_name
attr_accessor :items

def initialize(first_name, last_name)
@id = Random.rand(1..1000)
@first_name = first_name
@last_name = last_name
@items = []
end

def add_item(item)
item.author = self
@items << item
end
end
2 changes: 1 addition & 1 deletion classes/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def last_played_over_two_years_ago?

years_difference >= 2
end
end
end
21 changes: 0 additions & 21 deletions spec/author_spec.rb

This file was deleted.

42 changes: 0 additions & 42 deletions spec/game_spec.rb

This file was deleted.

0 comments on commit f1acc82

Please sign in to comment.