Class: Exemplor::Check
- Inherits:
-
Object
- Object
- Exemplor::Check
- Defined in:
- lib/checker.rb
Instance Method Summary collapse
- #[](disambiguate) ⇒ Object
- #failure? ⇒ Boolean
- #info? ⇒ Boolean
-
#initialize(name, value) ⇒ Check
constructor
A new instance of Check.
- #is(arg) ⇒ Object
- #name ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(name, value) ⇒ Check
Returns a new instance of Check.
4 5 6 7 |
# File 'lib/checker.rb', line 4 def initialize(name, value) @name = name @value = value end |
Instance Method Details
#[](disambiguate) ⇒ Object
9 10 11 12 |
# File 'lib/checker.rb', line 9 def [](disambiguate) @disambiguate = disambiguate self end |
#failure? ⇒ Boolean
26 27 28 |
# File 'lib/checker.rb', line 26 def failure? status == :failure end |
#info? ⇒ Boolean
30 31 32 |
# File 'lib/checker.rb', line 30 def info? status == :info end |
#is(arg) ⇒ Object
18 19 20 |
# File 'lib/checker.rb', line 18 def is(arg) warn "Check().is() doesn't assert anymore, use Assert()" end |
#name ⇒ Object
14 15 16 |
# File 'lib/checker.rb', line 14 def name @name + (defined?(@disambiguate) ? " #{@disambiguate}" : '') end |
#success? ⇒ Boolean
22 23 24 |
# File 'lib/checker.rb', line 22 def success? status == :success end |