Class: Ldp::Client
Defined Under Namespace
Modules: Methods
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes included from Methods
Instance Method Summary collapse
-
#find_or_initialize(subject, options = {}) ⇒ Object
Find or initialize a new LDP resource by URI.
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
- #logger ⇒ Object
Methods included from Methods
#delete, #get, #head, #initialize_http_client, #patch, #post, #put
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ldp/client.rb', line 11 def initialize(*args) http_client, = if args.length == 2 args elsif args.length == 1 && args.first.is_a?(Faraday::Connection) [args.first, {}] elsif args.length == 1 [nil, args.first] else raise ArgumentError end @options = initialize_http_client(http_client || ) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/ldp/client.rb', line 9 def @options end |