Class: Net::Nex
- Inherits:
-
Text::Generic
- Object
- Text::Generic
- Net::Nex
- Defined in:
- lib/net/nex.rb
Overview
A Nex client API for Ruby.
Net::Nex provides a library which can be used to build Nex user-agents.
Net::Nex is designed to work closely with URI.
Simple Examples
All examples assume you have loaded Net::Nex with:
require 'net/nex'
This will also require ‘uri’ so you don’t need to require it separately.
The Net::Nex methods in the following section do not persist connections.
GET by URI
uri = URI('nex://nightfall.city/nex/info/')
Net::Nex.get(uri) # => String
Class Method Summary collapse
Methods inherited from Text::Generic
Class Method Details
.get(string_or_uri) ⇒ Object
32 33 34 35 |
# File 'lib/net/nex.rb', line 32 def self.get(string_or_uri) uri = build_uri string_or_uri, URI::Nex request uri, "#{uri.path}\r\n" end |