Class: MetaCommit::Contracts::ChangeContext
- Inherits:
-
Object
- Object
- MetaCommit::Contracts::ChangeContext
- Defined in:
- lib/meta_commit_contracts/change_context.rb
Overview
DTO that keeps data of context of change
Instance Attribute Summary collapse
-
#column ⇒ Numeric, Nil
position of the first character in the new line that is different from character at the same position in the old line (it has meaning only when type == :replace).
-
#commit_id_new ⇒ String
hash of the new commit.
-
#commit_id_old ⇒ String
hash of the old commit.
-
#new_contextual_ast ⇒ MetaCommit::Contracts::ContextualAst
stores ast and context from the new file.
-
#new_file_path ⇒ String
path to new file.
-
#new_lineno ⇒ String
line number in the new file.
-
#old_contextual_ast ⇒ MetaCommit::Contracts::ContextualAst
stores ast and context from the old file.
-
#old_file_path ⇒ String
path to old file.
-
#old_lineno ⇒ String
line number in the old file.
-
#type ⇒ Symbol
operation that was performed :addition, :deletion, :replace.
Instance Attribute Details
#column ⇒ Numeric, Nil
position of the first character in the new line that is different from character at the same position in the old line (it has meaning only when type == :replace)
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def column @column end |
#commit_id_new ⇒ String
hash of the new commit
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def commit_id_new @commit_id_new end |
#commit_id_old ⇒ String
hash of the old commit
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def commit_id_old @commit_id_old end |
#new_contextual_ast ⇒ MetaCommit::Contracts::ContextualAst
stores ast and context from the new file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def new_contextual_ast @new_contextual_ast end |
#new_file_path ⇒ String
path to new file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def new_file_path @new_file_path end |
#new_lineno ⇒ String
line number in the new file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def new_lineno @new_lineno end |
#old_contextual_ast ⇒ MetaCommit::Contracts::ContextualAst
stores ast and context from the old file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def old_contextual_ast @old_contextual_ast end |
#old_file_path ⇒ String
path to old file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def old_file_path @old_file_path end |
#old_lineno ⇒ String
line number in the old file
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def old_lineno @old_lineno end |
#type ⇒ Symbol
operation that was performed :addition, :deletion, :replace
13 14 15 |
# File 'lib/meta_commit_contracts/change_context.rb', line 13 def type @type end |