Class: GithubMetadata::Commit
- Inherits:
-
Object
- Object
- GithubMetadata::Commit
- Defined in:
- lib/github_metadata.rb
Overview
Object representation of a commit, initialized from a github repo commit feed entry
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#committed_at ⇒ Object
readonly
Returns the value of attribute committed_at.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(atom_entry) ⇒ Commit
constructor
A new instance of Commit.
Constructor Details
#initialize(atom_entry) ⇒ Commit
Returns a new instance of Commit.
27 28 29 30 31 32 33 34 |
# File 'lib/github_metadata.rb', line 27 def initialize(atom_entry) @atom_entry = atom_entry @title = atom_entry.title @message = atom_entry.content @author = atom_entry. @committed_at = atom_entry.updated.kind_of?(Time) ? atom_entry.updated : Time.parse(atom_entry.updated) @url = atom_entry.url end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
25 26 27 |
# File 'lib/github_metadata.rb', line 25 def @author end |
#committed_at ⇒ Object (readonly)
Returns the value of attribute committed_at.
25 26 27 |
# File 'lib/github_metadata.rb', line 25 def committed_at @committed_at end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
25 26 27 |
# File 'lib/github_metadata.rb', line 25 def @message end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
25 26 27 |
# File 'lib/github_metadata.rb', line 25 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
25 26 27 |
# File 'lib/github_metadata.rb', line 25 def url @url end |