Class: Fastlane::Plugin::GitHubStatus::Message
- Inherits:
-
Object
- Object
- Fastlane::Plugin::GitHubStatus::Message
- Defined in:
- lib/fastlane/plugin/github_status/message.rb
Overview
Immutable module object representing the last status message provided by GitHub
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
A more descriptive message describing the current situation.
-
#created_on ⇒ Object
readonly
Time object representing when this status message was created by GitHub.
-
#status ⇒ Object
readonly
String representing one of three possible statuses: * ‘good’ - Everything is OK * ‘minor’ - GitHub is experiencing minor problems * ‘major’ - GitHub is experiencing major problems.
Instance Method Summary collapse
-
#initialize(data_hash) ⇒ Message
constructor
Expects to be called with a hash of the JSON data returned from the GitHub status API endpoint.
Constructor Details
#initialize(data_hash) ⇒ Message
Expects to be called with a hash of the JSON data returned from the GitHub status API endpoint
'status' => 'good',
'body' => 'Everything operating normally.',
'created_on' => '2016-06-01T16:40:35Z'
30 31 32 33 34 |
# File 'lib/fastlane/plugin/github_status/message.rb', line 30 def initialize(data_hash) @status = data_hash['status'] @body = data_hash['body'] @created_on = Time.parse(data_hash['created_on']) end |
Instance Attribute Details
#body ⇒ Object (readonly)
A more descriptive message describing the current situation
14 15 16 |
# File 'lib/fastlane/plugin/github_status/message.rb', line 14 def body @body end |
#created_on ⇒ Object (readonly)
Time object representing when this status message was created by GitHub
18 19 20 |
# File 'lib/fastlane/plugin/github_status/message.rb', line 18 def created_on @created_on end |
#status ⇒ Object (readonly)
String representing one of three possible statuses:
-
‘good’ - Everything is OK
-
‘minor’ - GitHub is experiencing minor problems
-
‘major’ - GitHub is experiencing major problems
11 12 13 |
# File 'lib/fastlane/plugin/github_status/message.rb', line 11 def status @status end |