Class: PPE_API::Designation
- Inherits:
-
Object
- Object
- PPE_API::Designation
- Includes:
- HappyMapper
- Defined in:
- lib/ppe_api/designation.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.get_by_name(name) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ppe_api/designation.rb', line 11 def self.get_by_name(name) res, data = ::DR::Config.http.post("/api/designation/name", "name=#{name}") return Designation.parse(data) unless data.nil? || data.empty? return nil end |
Instance Method Details
#==(des) ⇒ Object
18 19 20 21 |
# File 'lib/ppe_api/designation.rb', line 18 def ==(des) return false if des.nil? des.name==self.name end |
#to_xml(options = {}) ⇒ Object
23 24 25 |
# File 'lib/ppe_api/designation.rb', line 23 def to_xml(={}) self.as_json.to_xml({:root => "designation"}.merge()) end |