Class: Carbon
- Inherits:
-
Object
- Object
- Carbon
- Defined in:
- lib/carbon.rb
Overview
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize(chost = 'localhost', port = 2003) ⇒ Carbon
constructor
A new instance of Carbon.
- #send(msg) ⇒ Object
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
#close ⇒ Object
38 39 40 |
# File 'lib/carbon.rb', line 38 def close @carbon.close end |
#flush ⇒ Object
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 |