Class: CodebrekerManfly::Guess

Inherits:
ValidatableEntity show all
Defined in:
lib/codebreker_manfly/entities/guess.rb

Constant Summary collapse

CODE_LENGTH =
4

Instance Attribute Summary

Attributes inherited from ValidatableEntity

#errors

Instance Method Summary collapse

Methods inherited from ValidatableEntity

#valid?

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

#codeObject



12
13
14
# File 'lib/codebreker_manfly/entities/guess.rb', line 12

def code
  @code ||= parse_code
end