module Onering class API class Configuration < API def get(key, options={}) get("/config/#{key}").parsed_response end def set(key, value) if not value.is_a?(Hash) and not value.is_a?(Array) return save(key, value) end return nil end def save(key, data=nil, &block) if block_given? post("/config/#{key}", {}, &block) else post("/config/#{key}", { :body => data }) end end end end end