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
12 13 14 15 16 17 18 |
# File 'lib/ppe_api/designation.rb', line 12 def self.get_by_name(name) res, data = Config.http.post("/api/designation/name", "name=#{name}") res.value return Designation.parse(data) unless data.nil? || data.empty? return nil end |
Instance Method Details
#==(des) ⇒ Object
20 21 22 23 |
# File 'lib/ppe_api/designation.rb', line 20 def ==(des) return false if des.nil? des.name==self.name end |
#to_xml(options = {}) ⇒ Object
25 26 27 |
# File 'lib/ppe_api/designation.rb', line 25 def to_xml(={}) self.as_json.to_xml({:root => "designation"}.merge()) end |