Class: SortingServiceBooks::Book

Inherits:
Object
  • Object
show all
Defined in:
lib/sorting_service_books/book.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, author, edition) ⇒ Book

Returns a new instance of Book.



6
7
8
9
10
# File 'lib/sorting_service_books/book.rb', line 6

def initialize(title, author, edition)
  @title = title
  @author = author
  @edition = edition
end

Instance Attribute Details

#authorObject

Returns the value of attribute author.



4
5
6
# File 'lib/sorting_service_books/book.rb', line 4

def author
  @author
end

#editionObject

Returns the value of attribute edition.



4
5
6
# File 'lib/sorting_service_books/book.rb', line 4

def edition
  @edition
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/sorting_service_books/book.rb', line 4

def title
  @title
end