Sha256: 44698c0d9a5b30b30923fb33227cbb5e6ad471092e2f6f1ac2b0dc239a549758

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

module Kloudless
  # Public: Base class for different API resources. e.g. Account, Files, Folders.
  class Model
    def self.http
      Kloudless.http
    end

    def http
      self.class.http
    end

    def initialize(attributes = {})
      @attributes = attributes
    end

    def method_missing(name, *args, &blk)
      @attributes[name.to_s] || super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kloudless-1.0.1 lib/kloudless/model.rb
kloudless-1.0.0 lib/kloudless/model.rb