Class: Logbook::LogEntry
- Inherits:
-
Struct
- Object
- Struct
- Logbook::LogEntry
- Defined in:
- lib/logbook/log_entry.rb
Constant Summary collapse
- DATE_PROPERTY_NAME =
"Date"
Instance Attribute Summary collapse
-
#line_number ⇒ Object
Returns the value of attribute line_number.
-
#note ⇒ Object
Returns the value of attribute note.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
Instance Attribute Details
#line_number ⇒ Object
Returns the value of attribute line_number
2 3 4 |
# File 'lib/logbook/log_entry.rb', line 2 def line_number @line_number end |
#note ⇒ Object
Returns the value of attribute note
2 3 4 |
# File 'lib/logbook/log_entry.rb', line 2 def note @note end |
#properties ⇒ Object
Returns the value of attribute properties.
5 6 7 |
# File 'lib/logbook/log_entry.rb', line 5 def properties @properties end |
#time ⇒ Object
Returns the value of attribute time
2 3 4 |
# File 'lib/logbook/log_entry.rb', line 2 def time @time end |
Instance Method Details
#recorded_at ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/logbook/log_entry.rb', line 7 def recorded_at date = self.properties[DATE_PROPERTY_NAME].value time = self.time DateTime.parse(date + " " + time) rescue ArgumentError end |