Class: Ldp::PreferHeaders
- Inherits:
-
Object
- Object
- Ldp::PreferHeaders
- Defined in:
- lib/ldp/client/prefer_headers.rb
Instance Attribute Summary collapse
-
#headers_string ⇒ Object
readonly
Returns the value of attribute headers_string.
Instance Method Summary collapse
- #include ⇒ Object
- #include=(vals) ⇒ Object
-
#initialize(headers_string = "") ⇒ PreferHeaders
constructor
A new instance of PreferHeaders.
- #omit ⇒ Object
- #omit=(vals) ⇒ Object
- #return ⇒ Object
- #return=(vals) ⇒ Object
- #to_s ⇒ Object
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_string ⇒ Object (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
#include ⇒ Object
13 14 15 |
# File 'lib/ldp/client/prefer_headers.rb', line 13 def include @include ||= ["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 |
#omit ⇒ Object
9 10 11 |
# File 'lib/ldp/client/prefer_headers.rb', line 9 def omit @omit ||= ["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 |
#return ⇒ Object
17 18 19 |
# File 'lib/ldp/client/prefer_headers.rb', line 17 def return @return ||= ["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_s ⇒ Object
36 37 38 |
# File 'lib/ldp/client/prefer_headers.rb', line 36 def to_s headers_string.to_s end |