Class: Carbon

Inherits:
Object
  • Object
show all
Defined in:
lib/carbon.rb

Overview

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Instance Method Summary collapse

Constructor Details

#initialize(chost = 'localhost', port = 2003) ⇒ Carbon

Returns a new instance of Carbon.



23
24
25
# File 'lib/carbon.rb', line 23

def initialize(socket)
  @carbon = socket
end

Instance Method Details

#closeObject



38
39
40
# File 'lib/carbon.rb', line 38

def close
  @carbon.close
end

#flushObject



35
36
37
# File 'lib/carbon.rb', line 35

def flush
  @carbon.flush
end

#send(msg) ⇒ Object



31
32
33
# File 'lib/carbon.rb', line 31

def send(msg)
  @carbon.write(msg)
end