Class: Janky::GitHub::Commit
- Inherits:
-
Object
- Object
- Janky::GitHub::Commit
- Defined in:
- lib/janky/github/commit.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#sha1 ⇒ Object
readonly
Returns the value of attribute sha1.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #committed_at ⇒ Object
-
#initialize(sha1, url, message, author, time) ⇒ Commit
constructor
A new instance of Commit.
- #to_hash ⇒ Object
Constructor Details
#initialize(sha1, url, message, author, time) ⇒ Commit
Returns a new instance of Commit.
4 5 6 7 8 9 10 |
# File 'lib/janky/github/commit.rb', line 4 def initialize(sha1, url, , , time) @sha1 = sha1 @url = url = = @time = time end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
12 13 14 |
# File 'lib/janky/github/commit.rb', line 12 def end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
12 13 14 |
# File 'lib/janky/github/commit.rb', line 12 def end |
#sha1 ⇒ Object (readonly)
Returns the value of attribute sha1.
12 13 14 |
# File 'lib/janky/github/commit.rb', line 12 def sha1 @sha1 end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/janky/github/commit.rb', line 12 def url @url end |
Instance Method Details
#committed_at ⇒ Object
14 15 16 |
# File 'lib/janky/github/commit.rb', line 14 def committed_at @time end |
#to_hash ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/janky/github/commit.rb', line 18 def to_hash { :id => @sha1, :url => @url, :message => , :author => {:name => }, :timestamp => @time } end |