Class: Flowdock::Git::Commit
- Inherits:
-
Object
- Object
- Flowdock::Git::Commit
- Defined in:
- lib/flowdock/git/builder.rb
Instance Method Summary collapse
-
#initialize(external_thread_id, thread, tags, commit) ⇒ Commit
constructor
A new instance of Commit.
- #to_hash ⇒ Object
Constructor Details
#initialize(external_thread_id, thread, tags, commit) ⇒ Commit
Returns a new instance of Commit.
8 9 10 11 12 13 |
# File 'lib/flowdock/git/builder.rb', line 8 def initialize(external_thread_id, thread, , commit) @commit = commit @external_thread_id = external_thread_id @thread = thread = end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/flowdock/git/builder.rb', line 15 def to_hash hash = { external_thread_id: @external_thread_id, event: "activity", author: { name: @commit[:author][:name], email: @commit[:author][:email] }, title: title, thread: @thread, body: body } hash[:tags] = if encode(hash) end |