Class: Hookers::Git::Commit
- Inherits:
-
Object
- Object
- Hookers::Git::Commit
- Defined in:
- lib/hookers/git/commit.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(id, author, message) ⇒ Commit
constructor
A new instance of Commit.
- #to_xml ⇒ Object
Constructor Details
#initialize(id, author, message) ⇒ Commit
Returns a new instance of Commit.
8 9 10 11 12 |
# File 'lib/hookers/git/commit.rb', line 8 def initialize(id, , ) self.id = id self. = self. = end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
6 7 8 |
# File 'lib/hookers/git/commit.rb', line 6 def @author end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/hookers/git/commit.rb', line 6 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
6 7 8 |
# File 'lib/hookers/git/commit.rb', line 6 def @message end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/hookers/git/commit.rb', line 14 def to_xml "<source_commit> <commit_id> #{ self.id } </commit_id> <author> #{ CGI::escapeHTML(self.) } </author> <message> #{ CGI::escapeHTML(self.) } </message> </source_commit>" end |