Class: Google::Books::IndustryIdentifier
- Inherits:
-
Object
- Object
- Google::Books::IndustryIdentifier
- Defined in:
- lib/bookle/google_books_industry_identifier.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(identifier) ⇒ IndustryIdentifier
constructor
A new instance of IndustryIdentifier.
- #to_hash ⇒ Object
Constructor Details
#initialize(identifier) ⇒ IndustryIdentifier
Returns a new instance of IndustryIdentifier.
6 7 8 9 10 |
# File 'lib/bookle/google_books_industry_identifier.rb', line 6 def initialize(identifier) identifier = {} unless identifier @type = identifier["type"] @identifier = identifier["identifier"] end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
4 5 6 |
# File 'lib/bookle/google_books_industry_identifier.rb', line 4 def identifier @identifier end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/bookle/google_books_industry_identifier.rb', line 4 def type @type end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 |
# File 'lib/bookle/google_books_industry_identifier.rb', line 12 def to_hash {self.type.downcase => self.identifier} end |