Class: CXML::Request

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#builderObject

Returns the value of attribute builder.



10
11
12
# File 'lib/cxml/request.rb', line 10

def builder
  @builder
end

#deployment_modeObject

Returns the value of attribute deployment_mode.



9
10
11
# File 'lib/cxml/request.rb', line 9

def deployment_mode
  @deployment_mode
end

#idObject

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