Загрузить файлы в «/»

This commit is contained in:
2026-02-25 17:43:56 +00:00
parent 42f918c2ff
commit ca30d3ea19

25
book.rb Normal file
View File

@@ -0,0 +1,25 @@
class Book
class Book_1
def initialize (title, author, year)
title = "Война и мир"
author = "Лев Толстой"
year = "1869"
is_available = true
to_s = "ID: [id], [title] ([author], [year]) - [Доступна/Выдана]"
end
class Book_2
def initialize (title, author, year)
title = "Мастер и маргарита"
author = "Михаил Булгаков"
year = "1967"
is_available = false
to_s = "ID: [id], [title] ([author], [year]) - [Доступна/Выдана]"
end
end
end
end