Class: CXML::Request
- Inherits:
-
Object
- Object
- CXML::Request
- Defined in:
- lib/cxml/request.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
Returns the value of attribute builder.
-
#deployment_mode ⇒ Object
Returns the value of attribute deployment_mode.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Request
constructor
A new instance of Request.
- #render(node) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Request
Returns a new instance of Request.
12 13 14 15 16 17 18 |
# File 'lib/cxml/request.rb', line 12 def initialize(data={}) if data.kind_of?(Hash) && !data.empty? @id = data['id'] @deployment_mode = data['deploymentMode'] @builder = data['builder'] end end |
Instance Attribute Details
#builder ⇒ Object
Returns the value of attribute builder.
10 11 12 |
# File 'lib/cxml/request.rb', line 10 def builder @builder end |
#deployment_mode ⇒ Object
Returns the value of attribute deployment_mode.
9 10 11 |
# File 'lib/cxml/request.rb', line 9 def deployment_mode @deployment_mode end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/cxml/request.rb', line 8 def id @id end |
Instance Method Details
#render(node) ⇒ Object
20 21 22 |
# File 'lib/cxml/request.rb', line 20 def render(node) @builder.yield(node) if @builder end |