Class: Apadmi::Grout::PullRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/apadmi/grout/models/pull_request.rb

Overview

Represents a pull request object derived from the Jira REST API response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, merged, declined) ⇒ PullRequest

Returns a new instance of PullRequest.

Parameters:

  • id (String)
  • name (String)
  • merged (bool)
  • declined (bool)


22
23
24
25
26
27
28
# File 'lib/apadmi/grout/models/pull_request.rb', line 22

def initialize(id, name, merged, declined)
  @id = id
  @name = name
  @merged = merged
  @declined = declined
  @open = (!merged and !declined)
end

Instance Attribute Details

#declinedbool (readonly)

Returns:

  • (bool)


14
15
16
# File 'lib/apadmi/grout/models/pull_request.rb', line 14

def declined
  @declined
end

#idString (readonly)

Returns:

  • (String)


8
9
10
# File 'lib/apadmi/grout/models/pull_request.rb', line 8

def id
  @id
end

#mergedbool (readonly)

Returns:

  • (bool)


12
13
14
# File 'lib/apadmi/grout/models/pull_request.rb', line 12

def merged
  @merged
end

#nameString (readonly)

Returns:

  • (String)


10
11
12
# File 'lib/apadmi/grout/models/pull_request.rb', line 10

def name
  @name
end

#openbool (readonly)

Returns:

  • (bool)


16
17
18
# File 'lib/apadmi/grout/models/pull_request.rb', line 16

def open
  @open
end