Class: Wirecard::Elastic::Request::Body::Builder
- Inherits:
-
Object
- Object
- Wirecard::Elastic::Request::Body::Builder
- Defined in:
- lib/wirecard/elastic/request/body/builder.rb,
lib/wirecard/elastic/request/body/builder/xml.rb
Defined Under Namespace
Classes: Xml
Instance Attribute Summary collapse
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(origin, template) ⇒ Builder
constructor
set the template and the origin instance the origin will be used to setup the params by using the different datas of the class asking for a body content.
-
#params ⇒ Object
generation of the parameters used in the template through the origin instance.
-
#to_xml ⇒ Object
conversion into XML format.
Constructor Details
#initialize(origin, template) ⇒ Builder
set the template and the origin instance the origin will be used to setup the params by using the different datas of the class asking for a body content
15 16 17 18 |
# File 'lib/wirecard/elastic/request/body/builder.rb', line 15 def initialize(origin, template) @origin = origin @template = template end |
Instance Attribute Details
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
9 10 11 |
# File 'lib/wirecard/elastic/request/body/builder.rb', line 9 def origin @origin end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
9 10 11 |
# File 'lib/wirecard/elastic/request/body/builder.rb', line 9 def template @template end |
Instance Method Details
#params ⇒ Object
generation of the parameters used in the template through the origin instance
27 28 29 |
# File 'lib/wirecard/elastic/request/body/builder.rb', line 27 def params Params.const_get(template.capitalize).new(origin).deliver! end |