Class: TimexDatalinkClient::Protocol4::Eeprom::Appointment
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol4::Eeprom::Appointment
- Defined in:
- lib/timex_datalink_client/protocol_4/eeprom/appointment.rb
Constant Summary
Constants included from Helpers::CharEncoders
Helpers::CharEncoders::CHARS, Helpers::CharEncoders::CHARS_PROTOCOL_6, Helpers::CharEncoders::EEPROM_CHARS, Helpers::CharEncoders::EEPROM_TERMINATOR, Helpers::CharEncoders::INVALID_CHAR, Helpers::CharEncoders::PHONE_CHARS
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(time:, message:) ⇒ Appointment
constructor
Create an Appointment instance.
-
#packet ⇒ Array<Integer>
Compile a packet for an appointment.
Methods included from Helpers::CharEncoders
#chars_for, #eeprom_chars_for, #phone_chars_for, #protocol_6_chars_for
Constructor Details
#initialize(time:, message:) ⇒ Appointment
Create an Appointment instance.
20 21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom/appointment.rb', line 20 def initialize(time:, message:) @time = time @message = end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
13 14 15 |
# File 'lib/timex_datalink_client/protocol_4/eeprom/appointment.rb', line 13 def @message end |
#time ⇒ Object
Returns the value of attribute time.
13 14 15 |
# File 'lib/timex_datalink_client/protocol_4/eeprom/appointment.rb', line 13 def time @time end |
Instance Method Details
#packet ⇒ Array<Integer>
Compile a packet for an appointment.
28 29 30 31 32 33 34 35 |
# File 'lib/timex_datalink_client/protocol_4/eeprom/appointment.rb', line 28 def packet [ time.month, time.day, time_15m, ].flatten end |