Class: PixivApi::PixivBlob
- Inherits:
-
Object
- Object
- PixivApi::PixivBlob
- Defined in:
- lib/pixiv_api/pixiv_blob.rb
Constant Summary collapse
- REFERER =
'https://www.pixiv.net/'
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ PixivBlob
constructor
A new instance of PixivBlob.
- #open(&block) ⇒ Object
- #read ⇒ Object
- #to_path ⇒ Object
Constructor Details
#initialize(url) ⇒ PixivBlob
Returns a new instance of PixivBlob.
10 11 12 |
# File 'lib/pixiv_api/pixiv_blob.rb', line 10 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/pixiv_api/pixiv_blob.rb', line 8 def url @url end |
Instance Method Details
#open(&block) ⇒ Object
18 19 20 |
# File 'lib/pixiv_api/pixiv_blob.rb', line 18 def open(&block) File.open(filepath, &block) end |
#read ⇒ Object
14 15 16 |
# File 'lib/pixiv_api/pixiv_blob.rb', line 14 def read open(&:read) end |
#to_path ⇒ Object
22 23 24 |
# File 'lib/pixiv_api/pixiv_blob.rb', line 22 def to_path filepath end |