Class: RSpec::Contracts::Implementor
- Inherits:
-
Object
- Object
- RSpec::Contracts::Implementor
- Defined in:
- lib/rspec/contracts/implementor.rb
Instance Attribute Summary collapse
-
#interface_names ⇒ Object
readonly
Returns the value of attribute interface_names.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Class Method Summary collapse
Instance Method Summary collapse
- #add_message(message) ⇒ Object
-
#initialize ⇒ Implementor
constructor
A new instance of Implementor.
Constructor Details
#initialize ⇒ Implementor
Returns a new instance of Implementor.
6 7 8 9 |
# File 'lib/rspec/contracts/implementor.rb', line 6 def initialize @interface_names = [] = [] end |
Instance Attribute Details
#interface_names ⇒ Object (readonly)
Returns the value of attribute interface_names.
4 5 6 |
# File 'lib/rspec/contracts/implementor.rb', line 4 def interface_names @interface_names end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
4 5 6 |
# File 'lib/rspec/contracts/implementor.rb', line 4 def end |
Class Method Details
.all ⇒ Object
19 20 21 |
# File 'lib/rspec/contracts/implementor.rb', line 19 def self.all collection.values end |
.collection ⇒ Object
15 16 17 |
# File 'lib/rspec/contracts/implementor.rb', line 15 def self.collection @collection ||= {} end |
.find_or_create(subject) ⇒ Object
23 24 25 |
# File 'lib/rspec/contracts/implementor.rb', line 23 def self.find_or_create(subject) collection[subject] ||= new end |
Instance Method Details
#add_message(message) ⇒ Object
11 12 13 |
# File 'lib/rspec/contracts/implementor.rb', line 11 def () << end |