Class: Ghub::Models::StatusCheck

Inherits:
Struct
  • Object
show all
Defined in:
lib/ghub/models/status_check.rb

Overview

Defines a status check.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatusCheck

Returns a new instance of StatusCheck.



20
21
22
23
# File 'lib/ghub/models/status_check.rb', line 20

def initialize(**)
  super
  freeze
end

Instance Attribute Details

#checksObject

Returns the value of attribute checks

Returns:

  • (Object)

    the current value of checks



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def checks
  @checks
end

#contextsObject

Returns the value of attribute contexts

Returns:

  • (Object)

    the current value of contexts



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def contexts
  @contexts
end

#contexts_urlObject

Returns the value of attribute contexts_url

Returns:

  • (Object)

    the current value of contexts_url



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def contexts_url
  @contexts_url
end

#enforcement_levelObject

Returns the value of attribute enforcement_level

Returns:

  • (Object)

    the current value of enforcement_level



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def enforcement_level
  @enforcement_level
end

#strictObject

Returns the value of attribute strict

Returns:

  • (Object)

    the current value of strict



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def strict
  @strict
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



6
7
8
# File 'lib/ghub/models/status_check.rb', line 6

def url
  @url
end

Class Method Details

.for(**attributes) ⇒ Object



14
15
16
17
18
# File 'lib/ghub/models/status_check.rb', line 14

def self.for(**attributes)
  new(
    **attributes.merge!(checks: attributes[:checks].map { |arguments| Check[**arguments] })
  )
end