Class: MiniTransformer::Book
- Inherits:
-
Object
- Object
- MiniTransformer::Book
- Defined in:
- lib/mini_transformer/book.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#introduction ⇒ Object
Returns the value of attribute introduction.
-
#key_list ⇒ Object
Returns the value of attribute key_list.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def id @id end |
#introduction ⇒ Object
Returns the value of attribute introduction.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def introduction @introduction end |
#key_list ⇒ Object
Returns the value of attribute key_list.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def key_list @key_list end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def type @type end |
#uid ⇒ Object
Returns the value of attribute uid.
3 4 5 |
# File 'lib/mini_transformer/book.rb', line 3 def uid @uid end |
Instance Method Details
#to_json(*a) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mini_transformer/book.rb', line 5 def to_json(*a) { 'uid' => self.uid, 'type' => self.type, 'title' => self.title, 'id' => self.id, 'introduction' => self.introduction, "key-list" => self.key_list.to_json }.to_json(*a) end |