Class: Origen::Utility::FileDiff::OutputFile::Line
- Defined in:
- lib/origen/utility/file_diff.rb
Instance Attribute Summary collapse
-
#original_number ⇒ Object
Returns the value of attribute original_number.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, input_file) ⇒ Line
constructor
A new instance of Line.
Methods inherited from String
#camel_case, #escape_underscores, #excel_col_index, #is_downcase?, #is_numeric?, #is_upcase?, #is_verilog_number?, #match_all, #pad_leading_zeros, #squeeze_lines, #symbolize, #titleize, #to_bool, #to_dec, #to_lines, #to_numeric, #to_snakecase, #to_snakecase!
Constructor Details
#initialize(type, input_file) ⇒ Line
Returns a new instance of Line.
29 30 31 32 33 34 35 36 |
# File 'lib/origen/utility/file_diff.rb', line 29 def initialize(type, input_file) self.type = type return unless input_file replace(input_file.current_line) self.original_number = input_file.pointer + 1 input_file.advance_pointer! end |
Instance Attribute Details
#original_number ⇒ Object
Returns the value of attribute original_number.
27 28 29 |
# File 'lib/origen/utility/file_diff.rb', line 27 def original_number @original_number end |
#type ⇒ Object
Returns the value of attribute type.
27 28 29 |
# File 'lib/origen/utility/file_diff.rb', line 27 def type @type end |