Skip to content

Commit

Permalink
Add file named author.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
IvonneBenitesRodriguez committed Nov 29, 2023
1 parent 4cf2d4d commit 196cdbd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions classes/author.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Author
attr_reader :id
attr_accessor :first_name, :last_name, :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)
@items << item
end
end

0 comments on commit 196cdbd

Please sign in to comment.