Class: Travis::Client::Commit

Inherits:
Entity
  • Object
show all
Includes:
NotLoadable
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 included from NotLoadable

#complete?, #missing?

Methods inherited from Entity

#[], #[]=, aka, #attribute_names, attributes, base_path, #cancelable?, cast_id, #complete?, has, has_singleton, id?, id_field, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, preloadable, preloadable?, relations, #relations, #reload, #restartable?, subclass_for, subclasses, time, #to_h, #update_attributes, weak?

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


23
24
25
# File 'lib/travis/client/commit.rb', line 23

def inspect_info
  short_sha + " " + subject.inspect
end

#short_shaObject


19
20
21
# File 'lib/travis/client/commit.rb', line 19

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

#subjectObject


15
16
17
# File 'lib/travis/client/commit.rb', line 15

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