Class: Book

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ Book

Returns a new instance of Book.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/booksr/book.rb', line 5

def initialize(info)
    @title = info[:title]
    @subtitle = info[:subtitle]
    @authors = info[:authors]
    @published_date = info[:published_date]
    @publisher = info[:publisher]
    @description = info[:description]
    @page_count = info[:page_count]
    @lang = info[:lang]
    @isbn13 = info[:isbn13]
    @isbn10 = info[:isbn10]
end

Instance Attribute Details

#authorsObject (readonly)

Returns the value of attribute authors.



2
3
4
# File 'lib/booksr/book.rb', line 2

def authors
  @authors
end

#descriptionObject (readonly)

Returns the value of attribute description.



2
3
4
# File 'lib/booksr/book.rb', line 2

def description
  @description
end

#isbn10Object (readonly)

Returns the value of attribute isbn10.



3
4
5
# File 'lib/booksr/book.rb', line 3

def isbn10
  @isbn10
end

#isbn13Object (readonly)

Returns the value of attribute isbn13.



3
4
5
# File 'lib/booksr/book.rb', line 3

def isbn13
  @isbn13
end

#langObject (readonly)

Returns the value of attribute lang.



3
4
5
# File 'lib/booksr/book.rb', line 3

def lang
  @lang
end

#page_countObject (readonly)

Returns the value of attribute page_count.



3
4
5
# File 'lib/booksr/book.rb', line 3

def page_count
  @page_count
end

#published_dateObject (readonly)

Returns the value of attribute published_date.



2
3
4
# File 'lib/booksr/book.rb', line 2

def published_date
  @published_date
end

#publisherObject (readonly)

Returns the value of attribute publisher.



2
3
4
# File 'lib/booksr/book.rb', line 2

def publisher
  @publisher
end

#subtitleObject (readonly)

Returns the value of attribute subtitle.



2
3
4
# File 'lib/booksr/book.rb', line 2

def subtitle
  @subtitle
end

#titleObject (readonly)

Returns the value of attribute title.



2
3
4
# File 'lib/booksr/book.rb', line 2

def title
  @title
end