Sha256: fcae88f057e41bfbd5d33131384e7d9631c59a7a23ca3ff05c65e617d69c354e

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 Bytes

Contents

module Githu3
  
  class Resource < Githu3::Store
      
    extend Githu3::Relations
    
    def initialize(d, client)
      @client = client
      if d.is_a?(String)
        super(client.get(d).body)
      else
        super(d)
      end
    end
    
    def get *args
      @client.get(*args)
    end
    
    def path
      return if url.nil?
      URI.parse(url).path
    end
    
    protected
    
    def _client
      @client
    end
  
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
githu3-0.0.3 lib/githu3/resource.rb