Class: Travis::Client::Commit

Inherits:
Entity
  • Object
show all
Defined in:
lib/travis/client/commit.rb

Constant Summary

Constants inherited from Entity

Entity::MAP

Instance Attribute Summary collapse

Attributes inherited from Entity

#attributes, #curry, #id, #session

Instance Method Summary collapse

Methods inherited from Entity

#[], #[]=, aka, #attribute_names, attributes, cast_id, #complete?, has, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, relations, #relations, #reload, subclass_for, subclasses, time, #update_attributes

Constructor Details

This class inherits a constructor from Travis::Client::Entity

Instance Attribute Details

#author_emailObject (readonly)

Returns the value of attribute author_email.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def author_email
  @author_email
end

#author_nameObject (readonly)

Returns the value of attribute author_name.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def author_name
  @author_name
end

#branchObject (readonly)

Returns the value of attribute branch.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def branch
  @branch
end

#committed_atObject (readonly)

Returns the value of attribute committed_at.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def committed_at
  @committed_at
end

#committer_emailObject (readonly)

Returns the value of attribute committer_email.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def committer_email
  @committer_email
end

#committer_nameObject (readonly)

Returns the value of attribute committer_name.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def committer_name
  @committer_name
end

#compare_urlObject (readonly)

Returns the value of attribute compare_url.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def compare_url
  @compare_url
end

#messageObject (readonly)

Returns the value of attribute message.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def message
  @message
end

#shaObject (readonly)

Returns the value of attribute sha.



1
2
3
# File 'lib/travis/client/commit.rb', line 1

def sha
  @sha
end

Instance Method Details

#inspect_infoObject



21
22
23
# File 'lib/travis/client/commit.rb', line 21

def inspect_info
  short_sha + " " + subject.inspect
end

#short_shaObject



17
18
19
# File 'lib/travis/client/commit.rb', line 17

def short_sha
  sha.to_s[0..6]
end

#subjectObject



13
14
15
# File 'lib/travis/client/commit.rb', line 13

def subject
  message.to_s.lines.first.strip
end