Class: Urushiol::Txresp

Inherits:
Object
  • Object
show all
Defined in:
lib/txresp.rb

Instance Method Summary collapse

Constructor Details

#initializeTxresp

Returns a new instance of Txresp.



4
5
6
# File 'lib/txresp.rb', line 4

def initialize
  @resp = "\ntxresp"
end

Instance Method Details

#body(body) ⇒ Object



24
25
26
# File 'lib/txresp.rb', line 24

def body(body)
  @resp << " -body \"#{body}\""
end

#get_sourceObject



28
29
30
# File 'lib/txresp.rb', line 28

def get_source
  @resp
end

#header(hdr) ⇒ Object



20
21
22
# File 'lib/txresp.rb', line 20

def header(hdr)
  @resp << " -hdr \"#{hdr}\""
end

#message(msg) ⇒ Object



8
9
10
# File 'lib/txresp.rb', line 8

def message(msg)
  @resp << " -msg #{msg}"
end

#protocol(proto) ⇒ Object



12
13
14
# File 'lib/txresp.rb', line 12

def protocol(proto)
  @resp << " -proto #{proto}"
end

#status_code(status) ⇒ Object



16
17
18
# File 'lib/txresp.rb', line 16

def status_code(status)
  @resp << " -status #{status}"
end