Class: Baykit::BayServer::WaterCraft::Yacht
- Inherits:
-
Object
- Object
- Baykit::BayServer::WaterCraft::Yacht
- Includes:
- Agent::Transporter::DataListener, Util, Util::Reusable
- Defined in:
- lib/baykit/bayserver/watercraft/yacht.rb
Direct Known Subclasses
Constant Summary collapse
- YACHT_ID_NOCHECK =
-1
- INVALID_YACHT_ID =
0
Class Attribute Summary collapse
-
.oid_counter ⇒ Object
readonly
Returns the value of attribute oid_counter.
-
.yacht_id_counter ⇒ Object
readonly
Returns the value of attribute yacht_id_counter.
Instance Attribute Summary collapse
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
-
#yacht_id ⇒ Object
readonly
Returns the value of attribute yacht_id.
Instance Method Summary collapse
- #init_yacht ⇒ Object
-
#initialize ⇒ Yacht
constructor
A new instance of Yacht.
Methods included from Agent::Transporter::DataListener
#check_timeout, #notify_close, #notify_connect, #notify_eof, #notify_handshake_done, #notify_protocol_error, #notify_read
Constructor Details
#initialize ⇒ Yacht
Returns a new instance of Yacht.
31 32 33 34 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 31 def initialize() @object_id = Yacht.oid_counter.next() @yacht_id = INVALID_YACHT_ID end |
Class Attribute Details
.oid_counter ⇒ Object (readonly)
Returns the value of attribute oid_counter.
18 19 20 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 18 def oid_counter @oid_counter end |
.yacht_id_counter ⇒ Object (readonly)
Returns the value of attribute yacht_id_counter.
19 20 21 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 19 def yacht_id_counter @yacht_id_counter end |
Instance Attribute Details
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
25 26 27 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 25 def object_id @object_id end |
#yacht_id ⇒ Object (readonly)
Returns the value of attribute yacht_id.
26 27 28 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 26 def yacht_id @yacht_id end |
Instance Method Details
#init_yacht ⇒ Object
36 37 38 |
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 36 def init_yacht() @yacht_id = Yacht.yacht_id_counter.next() end |