Class: Pronto::Comment

Inherits:
Struct
  • Object
show all
Defined in:
lib/pronto/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



2
3
4
# File 'lib/pronto/comment.rb', line 2

def body
  @body
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



2
3
4
# File 'lib/pronto/comment.rb', line 2

def path
  @path
end

#positionObject

Returns the value of attribute position

Returns:

  • (Object)

    the current value of position



2
3
4
# File 'lib/pronto/comment.rb', line 2

def position
  @position
end

#shaObject

Returns the value of attribute sha

Returns:

  • (Object)

    the current value of sha



2
3
4
# File 'lib/pronto/comment.rb', line 2

def sha
  @sha
end

Instance Method Details

#==(other) ⇒ Object



3
4
5
6
7
# File 'lib/pronto/comment.rb', line 3

def ==(other)
  position == other.position &&
    path == other.path &&
    body == other.body
end

#to_sObject



9
10
11
# File 'lib/pronto/comment.rb', line 9

def to_s
  "[#{sha}] #{path}:#{position} - #{body}"
end