Class: AlexCodebreaker::Comparison
- Inherits:
-
Object
- Object
- AlexCodebreaker::Comparison
- Defined in:
- lib/alex_codebreaker/comparison.rb
Instance Method Summary collapse
-
#initialize(user_input, secret_code_for_comparison) ⇒ Comparison
constructor
A new instance of Comparison.
- #response ⇒ Object
Constructor Details
#initialize(user_input, secret_code_for_comparison) ⇒ Comparison
Returns a new instance of Comparison.
3 4 5 6 7 |
# File 'lib/alex_codebreaker/comparison.rb', line 3 def initialize(user_input, secret_code_for_comparison) @user_input = user_input @secret_code_for_comparison = secret_code_for_comparison @matching = { place: 0, presence: 0 } end |
Instance Method Details
#response ⇒ Object
9 10 11 12 13 |
# File 'lib/alex_codebreaker/comparison.rb', line 9 def response place_matches presence_matches format_response end |