Class: KCommercial::KCPipeline::KCCommit
- Inherits:
-
Object
- Object
- KCommercial::KCPipeline::KCCommit
- Defined in:
- lib/KCommercialPipeline/core/branch_diffs.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#author_info ⇒ Object
Returns the value of attribute author_info.
-
#commit_id ⇒ Object
Returns the value of attribute commit_id.
-
#date ⇒ Object
Returns the value of attribute date.
-
#message ⇒ Object
Returns the value of attribute message.
-
#ori_commit_id ⇒ Object
Returns the value of attribute ori_commit_id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#sha ⇒ Object
Returns the value of attribute sha.
Instance Method Summary collapse
-
#initialize(data) ⇒ KCCommit
constructor
A new instance of KCCommit.
Constructor Details
#initialize(data) ⇒ KCCommit
Returns a new instance of KCCommit.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 33 def initialize(data) data_c = data.clone data_c.delete("sha") data_c.delete("message") @ori_commit_id = data["sha"].chomp @commit_id = Digest::SHA1.hexdigest(data_c.to_s) @sha = data["sha"].chomp @message = data["message"].chomp @parent = data["parent"] @author_info = data["Author:"].chomp @author = GitAuthor.new(data["Author:"].chomp) @date = Time.parse(data["Date:"]).to_s.chomp end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
29 30 31 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 29 def @author end |
#author_info ⇒ Object
Returns the value of attribute author_info.
30 31 32 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 30 def @author_info end |
#commit_id ⇒ Object
Returns the value of attribute commit_id.
24 25 26 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 24 def commit_id @commit_id end |
#date ⇒ Object
Returns the value of attribute date.
31 32 33 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 31 def date @date end |
#message ⇒ Object
Returns the value of attribute message.
27 28 29 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 27 def @message end |
#ori_commit_id ⇒ Object
Returns the value of attribute ori_commit_id.
25 26 27 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 25 def ori_commit_id @ori_commit_id end |
#parent ⇒ Object
Returns the value of attribute parent.
28 29 30 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 28 def parent @parent end |
#sha ⇒ Object
Returns the value of attribute sha.
26 27 28 |
# File 'lib/KCommercialPipeline/core/branch_diffs.rb', line 26 def sha @sha end |