Class: RestEstimates

Inherits:
OpenShift::Model
  • Object
show all
Defined in:
app/models/rest_estimates.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, nolinks = false) ⇒ RestEstimates

Returns a new instance of RestEstimates.



4
5
6
7
8
9
10
# File 'app/models/rest_estimates.rb', line 4

def initialize(url, nolinks=false)
  self.links = {
    "GET_ESTIMATE" => Link.new("Get application estimate", "GET", URI::join(url, "estimates/application"), [
      Param.new("descriptor", "string", "application requirements")
    ]) 
  } unless nolinks
end

Instance Attribute Details

Returns the value of attribute links.



2
3
4
# File 'app/models/rest_estimates.rb', line 2

def links
  @links
end

Instance Method Details

#to_xml(options = {}) ⇒ Object



12
13
14
15
# File 'app/models/rest_estimates.rb', line 12

def to_xml(options={})
  options[:tag_name] = "estimates"
  super(options)
end