Class: Houston::Adapters::VersionControl::Commit

Inherits:
Object
  • Object
show all
Defined in:
app/adapters/houston/adapters/version_control/commit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Commit

Returns a new instance of Commit.



6
7
8
9
10
11
12
13
14
15
16
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 6

def initialize(attributes={})
  @sha = attributes[:sha]
  @parent_sha = attributes[:parent_sha]
  @message = attributes[:message]
  @authored_at = attributes[:authored_at]
  @author_name = attributes[:author_name]
  @author_email = attributes[:author_email]
  @committed_at = attributes[:committed_at]
  @committer_name = attributes[:committer_name]
  @committer_email = attributes[:committer_email]
end

Instance Attribute Details

#author_emailObject (readonly)

Returns the value of attribute author_email.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def author_email
  @author_email
end

#author_nameObject (readonly)

Returns the value of attribute author_name.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def author_name
  @author_name
end

#authored_atObject (readonly)

Returns the value of attribute authored_at.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def authored_at
  @authored_at
end

#committed_atObject (readonly)

Returns the value of attribute committed_at.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def committed_at
  @committed_at
end

#committer_emailObject (readonly)

Returns the value of attribute committer_email.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def committer_email
  @committer_email
end

#committer_nameObject (readonly)

Returns the value of attribute committer_name.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def committer_name
  @committer_name
end

#messageObject (readonly)

Returns the value of attribute message.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def message
  @message
end

#parent_shaObject (readonly)

Returns the value of attribute parent_sha.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def parent_sha
  @parent_sha
end

#shaObject (readonly)

Returns the value of attribute sha.



18
19
20
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 18

def sha
  @sha
end

Instance Method Details

#to_sObject



22
23
24
# File 'app/adapters/houston/adapters/version_control/commit.rb', line 22

def to_s
  sha[0...7]
end