Class: JenkinsTracker::ChangelogItem

Inherits:
Object
  • Object
show all
Defined in:
lib/jenkins_tracker/changelog_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ChangelogItem

Returns a new instance of ChangelogItem.



6
7
8
9
# File 'lib/jenkins_tracker/changelog_item.rb', line 6

def initialize(options = {})
  @story_id = options[:story_id]
  @commit_message = options[:commit_message]
end

Instance Attribute Details

#commit_messageObject

Returns the value of attribute commit_message.



4
5
6
# File 'lib/jenkins_tracker/changelog_item.rb', line 4

def commit_message
  @commit_message
end

#story_idObject

Returns the value of attribute story_id.



4
5
6
# File 'lib/jenkins_tracker/changelog_item.rb', line 4

def story_id
  @story_id
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
# File 'lib/jenkins_tracker/changelog_item.rb', line 11

def ==(other)
  self.story_id == other.story_id && self.commit_message == other.commit_message
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/jenkins_tracker/changelog_item.rb', line 15

def eql?(other)
  (self.class == other.class) && self == other
end

#hashObject



19
20
21
# File 'lib/jenkins_tracker/changelog_item.rb', line 19

def hash
  [story_id, commit_message].hash
end