Class: Sekken::Envelope
- Inherits:
-
Object
- Object
- Sekken::Envelope
- Defined in:
- lib/sekken/envelope.rb
Constant Summary collapse
- NSID =
'lol'
Instance Method Summary collapse
-
#initialize(operation, header, body) ⇒ Envelope
constructor
A new instance of Envelope.
- #register_namespace(namespace) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(operation, header, body) ⇒ Envelope
Returns a new instance of Envelope.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sekken/envelope.rb', line 9 def initialize(operation, header, body) @logger = Logging.logger[self] @operation = operation @header = header || {} @body = body || {} @nsid_counter = -1 @namespaces = {} end |
Instance Method Details
#register_namespace(namespace) ⇒ Object
20 21 22 |
# File 'lib/sekken/envelope.rb', line 20 def register_namespace(namespace) @namespaces[namespace] ||= create_nsid end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/sekken/envelope.rb', line 24 def to_s build_envelope(build_header, build_body) end |