class Ipfs::DagStream

Attributes

content[R]

Public Class Methods

new(response) click to toggle source
# File lib/dagstream.rb, line 7
def initialize(response)
  if response.status.code == 200
    @content = response.body.to_s
  else
    raise Error::InvalidDagStream, JSON.parse(response.body)['Message']
  end
end

Public Instance Methods

to_s() click to toggle source
# File lib/dagstream.rb, line 15
def to_s
  @content
end
Also aliased as: to_str
to_str()
Alias for: to_s