Class: Spage::Page
- Inherits:
-
Object
- Object
- Spage::Page
- Defined in:
- lib/spage/resources/page.rb
Overview
Page resource in statuspage.io
Instance Attribute Summary collapse
-
#activity_score ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#allow_email_subscribers ⇒ Object
Returns the value of attribute allow_email_subscribers.
-
#allow_incident_subscribers ⇒ Object
Returns the value of attribute allow_incident_subscribers.
-
#allow_page_subscribers ⇒ Object
Returns the value of attribute allow_page_subscribers.
-
#allow_rss_atom_feeds ⇒ Object
Returns the value of attribute allow_rss_atom_feeds.
-
#allow_sms_subscribers ⇒ Object
Returns the value of attribute allow_sms_subscribers.
-
#allow_webhook_subscribers ⇒ Object
Returns the value of attribute allow_webhook_subscribers.
-
#branding ⇒ Object
Returns the value of attribute branding.
-
#city ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#country ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#created_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#css_blues ⇒ Object
Returns the value of attribute css_blues.
-
#css_body_background_color ⇒ Object
Returns the value of attribute css_body_background_color.
-
#css_border_color ⇒ Object
Returns the value of attribute css_border_color.
-
#css_font_color ⇒ Object
Returns the value of attribute css_font_color.
-
#css_graph_color ⇒ Object
Returns the value of attribute css_graph_color.
-
#css_greens ⇒ Object
Returns the value of attribute css_greens.
-
#css_light_font_color ⇒ Object
Returns the value of attribute css_light_font_color.
-
#css_link_color ⇒ Object
Returns the value of attribute css_link_color.
-
#css_no_data ⇒ Object
Returns the value of attribute css_no_data.
-
#css_oranges ⇒ Object
Returns the value of attribute css_oranges.
-
#css_reds ⇒ Object
Returns the value of attribute css_reds.
-
#css_yellows ⇒ Object
Returns the value of attribute css_yellows.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#email_logo ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#favicon_logo ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#headline ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#hero_cover ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#hidden_from_search ⇒ Object
Returns the value of attribute hidden_from_search.
-
#id ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#ip_restrictions ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#name ⇒ Object
Returns the value of attribute name.
-
#notifications_email_footer ⇒ Object
Returns the value of attribute notifications_email_footer.
-
#notifications_from_email ⇒ Object
Returns the value of attribute notifications_from_email.
-
#page_description ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#state ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
-
#support_url ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#transactional_logo ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#twitter_logo ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#twitter_username ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#updated_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#url ⇒ Object
Returns the value of attribute url.
-
#viewers_must_be_team_members ⇒ Object
Returns the value of attribute viewers_must_be_team_members.
Instance Method Summary collapse
-
#date_parse(str) ⇒ Object
rubocop: enable Layout/LineLength.
-
#initialize(attrs) ⇒ Page
constructor
rubocop: disable Metrics/MethodLength, Metrics/AbcSize.
Constructor Details
#initialize(attrs) ⇒ Page
rubocop: disable Metrics/MethodLength, Metrics/AbcSize
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/spage/resources/page.rb', line 8 def initialize(attrs) @id = attrs['id'] @created_at = date_parse(attrs['created_at']) @updated_at = date_parse(attrs['updated_at']) @name = attrs['name'] @page_description = attrs['page_description'] @headline = attrs['headline'] @branding = attrs['branding'] @subdomain = attrs['subdomain'] @domain = attrs['domain'] @url = attrs['url'] @support_url = attrs['support_url'] @hidden_from_search = attrs['hidden_from_search'] @allow_page_subscribers = attrs['allow_page_subscribers'] @allow_incident_subscribers = attrs['allow_incident_subscribers'] @allow_email_subscribers = attrs['allow_email_subscribers'] @allow_sms_subscribers = attrs['allow_sms_subscribers'] @allow_rss_atom_feeds = attrs['allow_rss_atom_feeds'] @allow_webhook_subscribers = attrs['allow_webhook_subscribers'] @notifications_from_email = attrs['notifications_from_email'] @notifications_email_footer = attrs['notifications_email_footer'] @activity_score = attrs['activity_score'] @twitter_username = attrs['twitter_username'] @viewers_must_be_team_members = attrs['viewers_must_be_team_members'] @ip_restrictions = attrs['ip_restrictions'] @city = attrs['city'] @state = attrs['state'] @country = attrs['country'] @time_zone = attrs['time_zone'] @css_body_background_color = attrs['css_body_background_color'] @css_font_color = attrs['css_font_color'] @css_light_font_color = attrs['css_light_font_color'] @css_greens = attrs['css_greens'] @css_yellows = attrs['css_yellows'] @css_oranges = attrs['css_oranges'] @css_blues = attrs['css_blues'] @css_reds = attrs['css_reds'] @css_border_color = attrs['css_border_color'] @css_graph_color = attrs['css_graph_color'] @css_link_color = attrs['css_link_color'] @css_no_data = attrs['css_no_data'] @favicon_logo = attrs['favicon_logo'] @transactional_logo = attrs['transactional_logo'] @hero_cover = attrs['hero_cover'] @email_logo = attrs['email_logo'] @twitter_logo = attrs['twitter_logo'] end |
Instance Attribute Details
#activity_score ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def activity_score @activity_score end |
#allow_email_subscribers ⇒ Object
Returns the value of attribute allow_email_subscribers.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_email_subscribers @allow_email_subscribers end |
#allow_incident_subscribers ⇒ Object
Returns the value of attribute allow_incident_subscribers.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_incident_subscribers @allow_incident_subscribers end |
#allow_page_subscribers ⇒ Object
Returns the value of attribute allow_page_subscribers.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_page_subscribers @allow_page_subscribers end |
#allow_rss_atom_feeds ⇒ Object
Returns the value of attribute allow_rss_atom_feeds.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_rss_atom_feeds @allow_rss_atom_feeds end |
#allow_sms_subscribers ⇒ Object
Returns the value of attribute allow_sms_subscribers.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_sms_subscribers @allow_sms_subscribers end |
#allow_webhook_subscribers ⇒ Object
Returns the value of attribute allow_webhook_subscribers.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def allow_webhook_subscribers @allow_webhook_subscribers end |
#branding ⇒ Object
Returns the value of attribute branding.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def branding @branding end |
#city ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def city @city end |
#country ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def country @country end |
#created_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def created_at @created_at end |
#css_blues ⇒ Object
Returns the value of attribute css_blues.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_blues @css_blues end |
#css_body_background_color ⇒ Object
Returns the value of attribute css_body_background_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_body_background_color @css_body_background_color end |
#css_border_color ⇒ Object
Returns the value of attribute css_border_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_border_color @css_border_color end |
#css_font_color ⇒ Object
Returns the value of attribute css_font_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_font_color @css_font_color end |
#css_graph_color ⇒ Object
Returns the value of attribute css_graph_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_graph_color @css_graph_color end |
#css_greens ⇒ Object
Returns the value of attribute css_greens.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_greens @css_greens end |
#css_light_font_color ⇒ Object
Returns the value of attribute css_light_font_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_light_font_color @css_light_font_color end |
#css_link_color ⇒ Object
Returns the value of attribute css_link_color.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_link_color @css_link_color end |
#css_no_data ⇒ Object
Returns the value of attribute css_no_data.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_no_data @css_no_data end |
#css_oranges ⇒ Object
Returns the value of attribute css_oranges.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_oranges @css_oranges end |
#css_reds ⇒ Object
Returns the value of attribute css_reds.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_reds @css_reds end |
#css_yellows ⇒ Object
Returns the value of attribute css_yellows.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def css_yellows @css_yellows end |
#domain ⇒ Object
Returns the value of attribute domain.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def domain @domain end |
#email_logo ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def email_logo @email_logo end |
#favicon_logo ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def favicon_logo @favicon_logo end |
#headline ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def headline @headline end |
#hero_cover ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def hero_cover @hero_cover end |
#hidden_from_search ⇒ Object
Returns the value of attribute hidden_from_search.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def hidden_from_search @hidden_from_search end |
#id ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def id @id end |
#ip_restrictions ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def ip_restrictions @ip_restrictions end |
#name ⇒ Object
Returns the value of attribute name.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def name @name end |
#notifications_email_footer ⇒ Object
Returns the value of attribute notifications_email_footer.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def @notifications_email_footer end |
#notifications_from_email ⇒ Object
Returns the value of attribute notifications_from_email.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def notifications_from_email @notifications_from_email end |
#page_description ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def page_description @page_description end |
#state ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def state @state end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def subdomain @subdomain end |
#support_url ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def support_url @support_url end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def time_zone @time_zone end |
#transactional_logo ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def transactional_logo @transactional_logo end |
#twitter_logo ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def twitter_logo @twitter_logo end |
#twitter_username ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def twitter_username @twitter_username end |
#updated_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
58 59 60 |
# File 'lib/spage/resources/page.rb', line 58 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def url @url end |
#viewers_must_be_team_members ⇒ Object
Returns the value of attribute viewers_must_be_team_members.
60 61 62 |
# File 'lib/spage/resources/page.rb', line 60 def viewers_must_be_team_members @viewers_must_be_team_members end |
Instance Method Details
#date_parse(str) ⇒ Object
rubocop: enable Layout/LineLength
64 65 66 67 68 69 |
# File 'lib/spage/resources/page.rb', line 64 def date_parse(str) return str if str.nil? return str if str.is_a?(DateTime) DateTime.parse(str) end |