Sha256: 0465e396ffcfa48149de2222117620a613f1fb87ac864820c0ccaf4b11a479ca

Contents?: true

Size: 436 Bytes

Versions: 4

Compression:

Stored size: 436 Bytes

Contents

module Egnyte
  class Item
    def initialize(data, session)
      @data = data
      @session = session
    end

    def method_missing(method, *args, &block)
      @data[method.to_s]
    end

    def update_data(data)
      @data = @data.update(data)
      self
    end

    # mode can be either fs, or fs-content.
    def fs_path(mode='fs')
      "https://#{@session.domain}.egnyte.com/#{@session.api}/v1/#{mode}/"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
egnyte-1.0.0 lib/egnyte/item.rb
egnyte-0.1.0 lib/egnyte/item.rb
egnyte-0.0.5 lib/egnyte/item.rb
egnyte-0.0.1 lib/egnyte/item.rb