Class: GoogleBook::Book

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Book

Returns a new instance of Book.



14
15
16
# File 'lib/googlebook/book.rb', line 14

def initialize(args={})
  args.each { |k, v| self.send "#{k}=", v }
end

Instance Attribute Details

#creatorObject

Returns the value of attribute creator

Returns:

  • (Object)

    the current value of creator



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

def creator
  @creator
end

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



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

def date
  @date
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



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

def description
  @description
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



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

def format
  @format
end

#identifierObject

Returns the value of attribute identifier

Returns:

  • (Object)

    the current value of identifier



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

def identifier
  @identifier
end

#imagesObject

Returns the value of attribute images

Returns:

  • (Object)

    the current value of images



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

def images
  @images
end

#infoObject

Returns the value of attribute info

Returns:

  • (Object)

    the current value of info



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

def info
  @info
end

#previewObject

Returns the value of attribute preview

Returns:

  • (Object)

    the current value of preview



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

def preview
  @preview
end

#publisherObject

Returns the value of attribute publisher

Returns:

  • (Object)

    the current value of publisher



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

def publisher
  @publisher
end

#subjectObject

Returns the value of attribute subject

Returns:

  • (Object)

    the current value of subject



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

def subject
  @subject
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



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

def title
  @title
end

Instance Method Details

#isbnObject



18
19
20
# File 'lib/googlebook/book.rb', line 18

def isbn
  @isbn ||= find_isbn
end