Class: PactBroker::Contracts::Notice
- Inherits:
-
Struct
- Object
- Struct
- PactBroker::Contracts::Notice
- Defined in:
- lib/pact_broker/contracts/notice.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
- .debug(text) ⇒ Object
- .error(text) ⇒ Object
- .info(text) ⇒ Object
- .prompt(text) ⇒ Object
- .success(text) ⇒ Object
- .warning(text) ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text
3 4 5 |
# File 'lib/pact_broker/contracts/notice.rb', line 3 def text @text end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/pact_broker/contracts/notice.rb', line 3 def type @type end |
Class Method Details
.debug(text) ⇒ Object
8 9 10 |
# File 'lib/pact_broker/contracts/notice.rb', line 8 def self.debug(text) Notice.new("debug", text) end |
.error(text) ⇒ Object
24 25 26 |
# File 'lib/pact_broker/contracts/notice.rb', line 24 def self.error(text) Notice.new("error", text) end |
.info(text) ⇒ Object
4 5 6 |
# File 'lib/pact_broker/contracts/notice.rb', line 4 def self.info(text) Notice.new("info", text) end |
.prompt(text) ⇒ Object
16 17 18 |
# File 'lib/pact_broker/contracts/notice.rb', line 16 def self.prompt(text) Notice.new("prompt", text) end |
.success(text) ⇒ Object
20 21 22 |
# File 'lib/pact_broker/contracts/notice.rb', line 20 def self.success(text) Notice.new("success", text) end |
.warning(text) ⇒ Object
12 13 14 |
# File 'lib/pact_broker/contracts/notice.rb', line 12 def self.warning(text) Notice.new("warning", text) end |
Instance Method Details
#error? ⇒ Boolean
28 29 30 |
# File 'lib/pact_broker/contracts/notice.rb', line 28 def error? type == "error" end |