Module: HN

Defined in:
lib/hn_api.rb,
lib/hn/client.rb,
lib/hn/request.rb,
lib/hn/version.rb,
lib/hn/connection.rb,
lib/hn/configuration.rb

Defined Under Namespace

Modules: Configuration, Connection, Request Classes: Client, Version

Class Method Summary collapse

Class Method Details

.method_missing(method, *args, &block) ⇒ Object



10
11
12
13
# File 'lib/hn_api.rb', line 10

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

.newObject



6
7
8
# File 'lib/hn_api.rb', line 6

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

.respond_to?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/hn_api.rb', line 15

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