Sha256: f7ab1d483146760243ac38f8fc70ab53658095d67d3580bcd06f8582983bd1dc

Contents?: true

Size: 537 Bytes

Versions: 2

Compression:

Stored size: 537 Bytes

Contents

module LinkedIn
  class Base
    attr_reader :attributes

    def initialize(attributes={})
      @attributes = Hashie::Mash.new attributes
    end


    def method_missing(method, *args, &block)
      return @attributes.send(method, *args, &block) if @attributes.respond_to?(method)
      super
    end

    def respond_to?(method, include_all=false)
      return true if @attributes.respond_to method, include_all
      super
    end

    def client
      LinkedIn.new
    end

    def self.client
      LinkedIn.new
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
linkedin2-0.0.3 lib/linkedin/base.rb
linkedin2-0.0.2 lib/linkedin/base.rb