Class: Vx::ServiceConnector::Model::Payload

Inherits:
Struct
  • Object
show all
Defined in:
lib/vx/service_connector/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def base
  @base
end

#branchObject

Returns the value of attribute branch

Returns:

  • (Object)

    the current value of branch



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def branch
  @branch
end

#branch_labelObject

Returns the value of attribute branch_label

Returns:

  • (Object)

    the current value of branch_label



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def branch_label
  @branch_label
end

#headObject

Returns the value of attribute head

Returns:

  • (Object)

    the current value of head



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def head
  @head
end

#ignore?Object

Returns the value of attribute ignore?

Returns:

  • (Object)

    the current value of ignore?



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def ignore?
  @ignore?
end

#pull_request?Object

Returns the value of attribute pull_request?

Returns:

  • (Object)

    the current value of pull_request?



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def pull_request?
  @pull_request?
end

#pull_request_numberObject

Returns the value of attribute pull_request_number

Returns:

  • (Object)

    the current value of pull_request_number



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def pull_request_number
  @pull_request_number
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def url
  @url
end

Class Method Details

.from_hash(params) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/vx/service_connector/model.rb', line 27

def from_hash(params)
  payload = Payload.new
  payload.members.each do |m|
    payload[m] = params.key?(m) ? params[m] : params[m.to_s]
  end
  payload
end

Instance Method Details

#to_hashObject



24
# File 'lib/vx/service_connector/model.rb', line 24

def to_hash ; to_h end