lib/codestrap/client.rb
def capability(uri=nil)
      return @capability unless uri
      begin
        response    = Net::HTTP.get_response URI uri
        @capability = JSON.parse(response.body)
        return @capability
      rescue Errno::ECONNREFUSED
        nil
      end
    end
# Sets capability URL. Returns JSON capability document as hash.
#
# @param [URI] uri
#   Capability URI
# @return [Hash|nil]
#   JSON document as a Hash
Sets capability URL. Returns JSON capability document as hash.
Sets capability URL . Returns JSON capability document as hash .
def capability(uri=nil)
      return @capability unless uri
      begin
        response    = Net::HTTP.get_response URI uri
        @capability = JSON.parse(response.body)
        return @capability
      rescue Errno::ECONNREFUSED
        nil
      end
    end
def capability ( uri = nil ) return @capability unless uri begin response = Net :: HTTP . get_response URI uri @capability = JSON . parse ( response . body ) return @capability rescue Errno :: ECONNREFUSED nil end end
Sets capability URL.
Sets capability URL .
JSON document as a Hash
JSON document as a Hash
Hash|nil
uri
uri Capability URI
uri Capability URI