Class: Ldp::PreferHeaders

Inherits:
Object
  • Object
show all
Defined in:
lib/ldp/client/prefer_headers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers_string = "") ⇒ PreferHeaders

Returns a new instance of PreferHeaders.



5
6
7
# File 'lib/ldp/client/prefer_headers.rb', line 5

def initialize(headers_string = "")
  @headers_string = headers_string
end

Instance Attribute Details

#headers_stringObject (readonly)

Returns the value of attribute headers_string.



3
4
5
# File 'lib/ldp/client/prefer_headers.rb', line 3

def headers_string
  @headers_string
end

Instance Method Details

#includeObject



13
14
15
# File 'lib/ldp/client/prefer_headers.rb', line 13

def include
  @include ||= options["include"] || []
end

#include=(vals) ⇒ Object



21
22
23
24
# File 'lib/ldp/client/prefer_headers.rb', line 21

def include=(vals)
  @include = Array(vals)
  serialize
end

#omitObject



9
10
11
# File 'lib/ldp/client/prefer_headers.rb', line 9

def omit
  @omit ||= options["omit"] || []
end

#omit=(vals) ⇒ Object



26
27
28
29
# File 'lib/ldp/client/prefer_headers.rb', line 26

def omit=(vals)
  @omit = Array(vals)
  serialize
end

#returnObject



17
18
19
# File 'lib/ldp/client/prefer_headers.rb', line 17

def return
  @return ||= options["return"].first || ""
end

#return=(vals) ⇒ Object



31
32
33
34
# File 'lib/ldp/client/prefer_headers.rb', line 31

def return=(vals)
  @return = Array(vals).first
  serialize
end

#to_sObject



36
37
38
# File 'lib/ldp/client/prefer_headers.rb', line 36

def to_s
  headers_string.to_s
end