Class: Xrc::Elements::Bind
- Inherits:
-
REXML::Element
- Object
- REXML::Element
- Xrc::Elements::Bind
- Defined in:
- lib/xrc/elements/bind.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Bind
constructor
A new instance of Bind.
Constructor Details
#initialize(options = {}) ⇒ Bind
Returns a new instance of Bind.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xrc/elements/bind.rb', line 4 def initialize( = {}) super("iq") bind = REXML::Element.new("bind") bind.add_namespace(Namespaces::BIND) if [:resource] resource = REXML::Element.new("resource") resource.text = [:resource] bind.add(resource) end add_attributes("type" => "set") add(bind) end |