Class: Duckface::CheckSession
- Inherits:
-
Object
- Object
- Duckface::CheckSession
- Defined in:
- lib/duckface/check_session.rb
Instance Attribute Summary collapse
-
#methods_not_implemented ⇒ Object
readonly
Returns the value of attribute methods_not_implemented.
-
#methods_with_incorrect_signatures ⇒ Object
readonly
Returns the value of attribute methods_with_incorrect_signatures.
Instance Method Summary collapse
-
#initialize ⇒ CheckSession
constructor
A new instance of CheckSession.
- #notice_method_with_incorrect_signature(method_name) ⇒ Object
- #notice_not_implemented_method(method_name) ⇒ Object
- #null? ⇒ Boolean
- #successful? ⇒ Boolean (also: #correctly)
Constructor Details
#initialize ⇒ CheckSession
Returns a new instance of CheckSession.
5 6 7 8 |
# File 'lib/duckface/check_session.rb', line 5 def initialize @methods_not_implemented = [] @methods_with_incorrect_signatures = [] end |
Instance Attribute Details
#methods_not_implemented ⇒ Object (readonly)
Returns the value of attribute methods_not_implemented.
10 11 12 |
# File 'lib/duckface/check_session.rb', line 10 def methods_not_implemented @methods_not_implemented end |
#methods_with_incorrect_signatures ⇒ Object (readonly)
Returns the value of attribute methods_with_incorrect_signatures.
10 11 12 |
# File 'lib/duckface/check_session.rb', line 10 def methods_with_incorrect_signatures @methods_with_incorrect_signatures end |
Instance Method Details
#notice_method_with_incorrect_signature(method_name) ⇒ Object
17 18 19 |
# File 'lib/duckface/check_session.rb', line 17 def notice_method_with_incorrect_signature(method_name) @methods_with_incorrect_signatures << method_name end |
#notice_not_implemented_method(method_name) ⇒ Object
13 14 15 |
# File 'lib/duckface/check_session.rb', line 13 def notice_not_implemented_method(method_name) @methods_not_implemented << method_name end |
#null? ⇒ Boolean
25 26 27 |
# File 'lib/duckface/check_session.rb', line 25 def null? false end |
#successful? ⇒ Boolean Also known as: correctly
21 22 23 |
# File 'lib/duckface/check_session.rb', line 21 def successful? @methods_not_implemented.empty? && @methods_with_incorrect_signatures.empty? end |