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.
5 6 7 8 9 10 |
# File 'lib/flowdock/git/builder.rb', line 5 def initialize(external_thread_id, thread, , commit) @commit = commit @external_thread_id = external_thread_id @thread = thread @tags = end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/flowdock/git/builder.rb', line 12 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] = @tags if @tags encode(hash) end |