lib/runcible/resources/unit.rb in runcible-0.4.12 vs lib/runcible/resources/unit.rb in runcible-1.0.0
- old
+ new
@@ -29,20 +29,20 @@
# Generates the API path for Units
#
# @param [String] type the unit type
# @return [String] the unit search path
- def self.path(type)
+ def path(type)
"content/units/#{type}/search/"
end
# Searches a given unit type based on criteria
#
# @param [String] type the unit type
# @param [Hash] criteria criteria object containing Mongo syntax
# @param [Hash] optional container for all optional parameters
# @return [RestClient::Response]
- def self.search(type, criteria, optional={})
+ def search(type, criteria, optional={})
call(:post, path(type), :payload=>{:required=>{:criteria=>criteria}, :optional=>optional})
end
end
end