Class: CodebrekerManfly::Guess
- Inherits:
-
ValidatableEntity
- Object
- ValidatableEntity
- CodebrekerManfly::Guess
- Defined in:
- lib/codebreker_manfly/entities/guess.rb
Constant Summary collapse
- CODE_LENGTH =
4
Instance Attribute Summary
Attributes inherited from ValidatableEntity
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(string_code) ⇒ Guess
constructor
A new instance of Guess.
Methods inherited from ValidatableEntity
Methods included from Validator
#valid_class?, #valid_non_empty_string?, #valid_non_negative_integer?, #valid_only_numeric_string?, #valid_positive_integer?, #valid_range?, #valid_string_max_length?, #valid_string_min_length?
Constructor Details
#initialize(string_code) ⇒ Guess
Returns a new instance of Guess.
7 8 9 10 |
# File 'lib/codebreker_manfly/entities/guess.rb', line 7 def initialize(string_code) super() @string_code = string_code end |
Instance Method Details
#code ⇒ Object
12 13 14 |
# File 'lib/codebreker_manfly/entities/guess.rb', line 12 def code @code ||= parse_code end |