Class: Google::Books::Pdf

Inherits:
Object
  • Object
show all
Defined in:
lib/bookle/google_books_pdf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pdf) ⇒ Pdf

Returns a new instance of Pdf.



6
7
8
9
# File 'lib/bookle/google_books_pdf.rb', line 6

def initialize(pdf)
	pdf 					= {} unless pdf
	@is_available = pdf["isAvailable"]
end

Instance Attribute Details

#is_availableObject (readonly)

Returns the value of attribute is_available.



4
5
6
# File 'lib/bookle/google_books_pdf.rb', line 4

def is_available
  @is_available
end

Instance Method Details

#to_hashObject



11
12
13
# File 'lib/bookle/google_books_pdf.rb', line 11

def to_hash
	{"is_pdf_available" => self.is_available}
end