Class: Ukemi::Record
- Inherits:
-
Object
- Object
- Ukemi::Record
- Defined in:
- lib/ukemi/record.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#first_seen ⇒ Object
readonly
Returns the value of attribute first_seen.
-
#last_seen ⇒ Object
readonly
Returns the value of attribute last_seen.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(data:, first_seen: nil, last_seen: nil, source: nil) ⇒ Record
constructor
A new instance of Record.
- #to_h ⇒ Object
Constructor Details
#initialize(data:, first_seen: nil, last_seen: nil, source: nil) ⇒ Record
Returns a new instance of Record.
7 8 9 10 11 12 |
# File 'lib/ukemi/record.rb', line 7 def initialize(data:, first_seen: nil, last_seen: nil, source: nil) @data = data @first_seen = first_seen @last_seen = last_seen @source = source end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/ukemi/record.rb', line 5 def data @data end |
#first_seen ⇒ Object (readonly)
Returns the value of attribute first_seen.
5 6 7 |
# File 'lib/ukemi/record.rb', line 5 def first_seen @first_seen end |
#last_seen ⇒ Object (readonly)
Returns the value of attribute last_seen.
5 6 7 |
# File 'lib/ukemi/record.rb', line 5 def last_seen @last_seen end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/ukemi/record.rb', line 5 def source @source end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/ukemi/record.rb', line 14 def to_h { data: data, first_seen: first_seen, last_seen: last_seen, source: source } end |