Method: Ldp::Resource::BinarySource#initialize

Defined in:
lib/ldp/resource/binary_source.rb

#initialize(client, subject, content_or_response = nil, base_path = '') ⇒ BinarySource

Returns a new instance of BinarySource.

Parameters:

  • client (Ldp::Client)
  • subject (String)

    the URI for the resource

  • content_or_response (String, Ldp::Response) (defaults to: nil)
  • base_path (String) (defaults to: '')

    (”)



9
10
11
12
13
14
15
16
17
# File 'lib/ldp/resource/binary_source.rb', line 9

def initialize client, subject, content_or_response = nil, base_path = ''
  super

  case content_or_response
  when Ldp::Response
  else
    @content = content_or_response
  end
end