Class: Bilibili::FavMediaInfo
- Inherits:
-
Object
- Object
- Bilibili::FavMediaInfo
- Defined in:
- lib/bilibili_console/fav.rb
Overview
fav media info
Instance Attribute Summary collapse
-
#bv_id ⇒ Object
Returns the value of attribute bv_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#intro ⇒ Object
Returns the value of attribute intro.
-
#page ⇒ Object
Returns the value of attribute page.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ FavMediaInfo
constructor
A new instance of FavMediaInfo.
- #to_json(*opt) ⇒ Object
Constructor Details
#initialize(json) ⇒ FavMediaInfo
Returns a new instance of FavMediaInfo.
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/bilibili_console/fav.rb', line 109 def initialize(json) return if json.nil? @id = json[:id] @type = json[:type] @title = json[:title] @intro = json[:intro] @page = json[:page] @bv_id = json[:bv_id] end |
Instance Attribute Details
#bv_id ⇒ Object
Returns the value of attribute bv_id.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def bv_id @bv_id end |
#id ⇒ Object
Returns the value of attribute id.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def id @id end |
#intro ⇒ Object
Returns the value of attribute intro.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def intro @intro end |
#page ⇒ Object
Returns the value of attribute page.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def page @page end |
#title ⇒ Object
Returns the value of attribute title.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
107 108 109 |
# File 'lib/bilibili_console/fav.rb', line 107 def type @type end |
Instance Method Details
#to_json(*opt) ⇒ Object
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/bilibili_console/fav.rb', line 120 def to_json(*opt) { id: @id, type: @type, title: @title, intro: @intro, page: @page, bv_id: @bv_id }.to_json(*opt) end |