Skip to content

Commit

Permalink
Misc: rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
HFG43 committed Sep 2, 2023
1 parent 3e3c429 commit e9d7af3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def initialize

def list_all_books
@books.each_with_index do |book, idx|
puts '\n#{idx}) Book title: #{book.title}, written by #{book.author}'
puts "\n#{idx}) Book title: #{book.title}, written by #{book.author}"
end
end

def list_all_people
@people.each_with_index do |person, idx|
puts '\n #{idx}) #{person.type} id: (#{person.id}) Name: #{person.name} age: #{person.age}'
puts "\n #{idx}) #{person.type} id: (#{person.id}) Name: #{person.name} age: #{person.age}"
end
end

Expand Down Expand Up @@ -112,7 +112,7 @@ def rental_person_id
id = gets.chomp.strip.to_i

@rental.map do |rental|
puts '\n On #{rental.date} rental of #{rental.book.title}, by #{rental.book.author}' if rental.person.id == id
puts "\n On #{rental.date} rental of #{rental.book.title}, by #{rental.book.author}" if rental.person.id == id
end
end
end
2 changes: 1 addition & 1 deletion main.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'app'

def options_menu
puts "Please choose your menu option!"
puts 'Please choose your menu option!'
puts "\n"
puts '1 - List all books'
puts '2 - List all people'
Expand Down

0 comments on commit e9d7af3

Please sign in to comment.