Sha256: 41b3a7030bcfa5fb2eb87c982cca3850e9d6a1f59a0585ec8a644802815676a6

Contents?: true

Size: 405 Bytes

Versions: 2

Compression:

Stored size: 405 Bytes

Contents

require_relative 'hn/client'

module HN
  class << self

    def new
      @client ||= HN::Client.new
    end

    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hn_api-0.0.2 lib/hn_api.rb
hn_api-0.0.1 lib/hn_api.rb