Module: VisionMate

Defined in:
lib/vision_mate.rb,
lib/vision_mate/rack.rb,
lib/vision_mate/tube.rb,
lib/vision_mate/telnet.rb,
lib/vision_mate/no_tube.rb,
lib/vision_mate/version.rb,
lib/vision_mate/connection.rb,
lib/vision_mate/configuration.rb

Defined Under Namespace

Modules: Configuration Classes: Connection, NoTube, Rack, Telnet, Tube

Constant Summary collapse

VERSION =
"0.2.4"

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object

Used to configure long lived information needed throughout the scanning process. Provides access to host and port along with other information used to configure the orientation and dimensions of scanned racks.

Example:

VisionMate.configure do |config|
  config.host = "192.168.1.1"
  config.port = "8080"
end

VisionMate::Configuration.host # => "192.168.1.1"
VisionMate::Configuration.port # => "8080"


24
25
26
# File 'lib/vision_mate.rb', line 24

def self.configure(&block)
  block.call(VisionMate::Configuration)
end

.connectObject



28
29
30
31
32
# File 'lib/vision_mate.rb', line 28

def self.connect
  host = Configuration.host
  port = Configuration.port
  Connection.new(host, port)
end