Sha256: b702cc6fd7b2c6e35c80b36ad1d2467446f3a8ee346903bc1dc9b1254de010ec

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

class TenderType
  attr_accessor :tender_type_id, :identifier, :name

  # :internal => :external
  def self.attribute_map
  {
      :tender_type_id => :tender_type_id, :identifier => :identifier, :name => :name

  }
  end

  def initialize(attributes = {})
    # Morph attribute keys into undescored rubyish style
    if attributes.to_s != ""

      if TenderType.attribute_map["tender_type_id".to_sym] != nil
        name = "tender_type_id".to_sym
        value = attributes["tender_type_id"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      if TenderType.attribute_map["identifier".to_sym] != nil
        name = "identifier".to_sym
        value = attributes["identifier"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      if TenderType.attribute_map["name".to_sym] != nil
        name = "name".to_sym
        value = attributes["name"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      end
  end

  def to_body
    body = {}
    TenderType.attribute_map.each_pair do |key,value|
      body[value] = self.send(key) unless self.send(key).nil?
    end
    body
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
subtledata-0.0.5 models/tendertype.rb
subtledata-0.0.3 models/tendertype.rb