Class: Spage::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/spage/resources/component.rb

Overview

Page resource in statuspage.io

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Component

rubocop: disable Metrics/MethodLength, Metrics/AbcSize



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/spage/resources/component.rb', line 8

def initialize(attrs)
  @id               = attrs['id']
  @page_id          = attrs['page_id']
  @created_at       = attrs['created_at']
  @updated_at       = attrs['updated_at']
  @group            = attrs['group']
  @position         = attrs['position']
  @automation_email = attrs['automation_email']

  # Updatable properties
  @description           = attrs['description']
  @status                = attrs['status']
  @name                  = attrs['name']
  @only_show_if_degraded = attrs['only_show_if_degraded']
  @group_id              = attrs['group_id']
  @showcase              = attrs['showcase']
end

Instance Attribute Details

#automation_emailObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def automation_email
  @automation_email
end

#created_atObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def description
  @description
end

#groupObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def group
  @group
end

#group_idObject

Returns the value of attribute group_id.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def group_id
  @group_id
end

#idObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def id
  @id
end

#nameObject

Returns the value of attribute name.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def name
  @name
end

#only_show_if_degradedObject

Returns the value of attribute only_show_if_degraded.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def only_show_if_degraded
  @only_show_if_degraded
end

#page_idObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def page_id
  @page_id
end

#positionObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def position
  @position
end

#showcaseObject

Returns the value of attribute showcase.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def showcase
  @showcase
end

#statusObject

Returns the value of attribute status.



30
31
32
# File 'lib/spage/resources/component.rb', line 30

def status
  @status
end

#updated_atObject (readonly)

rubocop: disable Layout/LineLength



28
29
30
# File 'lib/spage/resources/component.rb', line 28

def updated_at
  @updated_at
end