Class: StashNotifier::BuildResult
- Inherits:
-
Object
- Object
- StashNotifier::BuildResult
- Defined in:
- lib/stash_notifier/build_result.rb
Constant Summary collapse
- VALID_BUILD_STATES =
%w{ INPROGRESS SUCCESSFUL FAILED }
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(args) ⇒ BuildResult
constructor
A new instance of BuildResult.
- #to_json ⇒ Object
Constructor Details
#initialize(args) ⇒ BuildResult
Returns a new instance of BuildResult.
24 25 26 27 28 29 30 |
# File 'lib/stash_notifier/build_result.rb', line 24 def initialize(args) self.state = args[:state] @key = args[:key] @name = args[:name] @url = args[:url] @description = args[:description] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
19 20 21 |
# File 'lib/stash_notifier/build_result.rb', line 19 def description @description end |
#key ⇒ Object
Returns the value of attribute key.
19 20 21 |
# File 'lib/stash_notifier/build_result.rb', line 19 def key @key end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/stash_notifier/build_result.rb', line 19 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
20 21 22 |
# File 'lib/stash_notifier/build_result.rb', line 20 def state @state end |
#url ⇒ Object
Returns the value of attribute url.
19 20 21 |
# File 'lib/stash_notifier/build_result.rb', line 19 def url @url end |
Instance Method Details
#to_json ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/stash_notifier/build_result.rb', line 41 def to_json result = { state: state, key: key, name: name, url: url, description: description } result.to_json end |