Class: Datanorm::Lines::V5::Text
- Inherits:
-
Base
- Object
- Base
- Datanorm::Lines::V5::Text
show all
- Defined in:
- lib/datanorm/lines/v5/text.rb
Overview
One line of the Datanorm file starting with T
Instance Attribute Summary
Attributes inherited from Base
#columns, #source_line_number
Instance Method Summary
collapse
Methods inherited from Base
#as_json, #encode, inherited, #initialize, #record_kind, #to_json
Instance Method Details
#<=>(other) ⇒ Object
24
25
26
|
# File 'lib/datanorm/lines/v5/text.rb', line 24
def <=>(other)
line_number <=> other.line_number
end
|
#content ⇒ Object
20
21
22
|
# File 'lib/datanorm/lines/v5/text.rb', line 20
def content
columns[5]
end
|
#id ⇒ Object
12
13
14
|
# File 'lib/datanorm/lines/v5/text.rb', line 12
def id
columns[2]
end
|
#line_number ⇒ Object
16
17
18
|
# File 'lib/datanorm/lines/v5/text.rb', line 16
def line_number
columns[4].to_i
end
|
#to_s ⇒ Object
8
9
10
|
# File 'lib/datanorm/lines/v5/text.rb', line 8
def to_s
"[#{id}] TEXT-5 #{line_number} #{content}"
end
|