Sha256: c1ed2fde258565727d9b887f62a496eccda34c55e93bdbc7fb6753689a440099

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

module Dribbble
  module Utils
    module Findable
      module ClassMethods
        def find(token, id)
          @token = token
          @client = Dribbble::Client.new token: @token
          @client.send "get_#{name.split('::').last.downcase}", id
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dribbble-1.0.0.beta2 lib/dribbble/utils/findable.rb
dribbble-1.0.0.beta1 lib/dribbble/utils/findable.rb