Class: Google::Books::AccessInfo
- Inherits:
-
Object
- Object
- Google::Books::AccessInfo
- Defined in:
- lib/bookle/google_books_access_info.rb
Instance Attribute Summary collapse
-
#access_country ⇒ Object
readonly
Returns the value of attribute access_country.
-
#access_view_status ⇒ Object
readonly
Returns the value of attribute access_view_status.
-
#embeddable ⇒ Object
readonly
Returns the value of attribute embeddable.
-
#epub ⇒ Object
readonly
Returns the value of attribute epub.
-
#pdf ⇒ Object
readonly
Returns the value of attribute pdf.
-
#public_domain ⇒ Object
readonly
Returns the value of attribute public_domain.
-
#text_to_speech_permission ⇒ Object
readonly
Returns the value of attribute text_to_speech_permission.
-
#viewability ⇒ Object
readonly
Returns the value of attribute viewability.
-
#web_reader_link ⇒ Object
readonly
Returns the value of attribute web_reader_link.
Instance Method Summary collapse
-
#initialize(access_info) ⇒ AccessInfo
constructor
A new instance of AccessInfo.
Constructor Details
#initialize(access_info) ⇒ AccessInfo
Returns a new instance of AccessInfo.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bookle/google_books_access_info.rb', line 10 def initialize(access_info) access_info = {} unless access_info @access_country = access_info["country"] @viewability = access_info["viewability"] @embeddable = access_info["embeddable"] @public_domain = access_info["publicDomain"] @text_to_speech_permission = access_info["textToSpeechPermission"] @epub = Google::Books::Epub.new(access_info["epub"]) @pdf = Google::Books::Pdf.new(access_info["pdf"]) @web_reader_link = access_info["webReaderLink"] @access_view_status = access_info["accessViewStatus"] end |
Instance Attribute Details
#access_country ⇒ Object (readonly)
Returns the value of attribute access_country.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def access_country @access_country end |
#access_view_status ⇒ Object (readonly)
Returns the value of attribute access_view_status.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def access_view_status @access_view_status end |
#embeddable ⇒ Object (readonly)
Returns the value of attribute embeddable.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def @embeddable end |
#epub ⇒ Object (readonly)
Returns the value of attribute epub.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def epub @epub end |
#pdf ⇒ Object (readonly)
Returns the value of attribute pdf.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def pdf @pdf end |
#public_domain ⇒ Object (readonly)
Returns the value of attribute public_domain.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def public_domain @public_domain end |
#text_to_speech_permission ⇒ Object (readonly)
Returns the value of attribute text_to_speech_permission.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def @text_to_speech_permission end |
#viewability ⇒ Object (readonly)
Returns the value of attribute viewability.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def viewability @viewability end |
#web_reader_link ⇒ Object (readonly)
Returns the value of attribute web_reader_link.
7 8 9 |
# File 'lib/bookle/google_books_access_info.rb', line 7 def web_reader_link @web_reader_link end |