Class: CodebreakerVk::CheckErrors
- Inherits:
-
ValidatingData
- Object
- ValidatingData
- CodebreakerVk::CheckErrors
- Defined in:
- lib/codebreaker_vk/check_errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(input) ⇒ CheckErrors
constructor
A new instance of CheckErrors.
- #validate ⇒ Object
Methods inherited from ValidatingData
Methods included from Validate
#check_cover?, #check_include?, #check_numbers?, #check_size?
Constructor Details
#initialize(input) ⇒ CheckErrors
Returns a new instance of CheckErrors.
7 8 9 10 |
# File 'lib/codebreaker_vk/check_errors.rb', line 7 def initialize(input) super() @input = input end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/codebreaker_vk/check_errors.rb', line 5 def errors @errors end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
5 6 7 |
# File 'lib/codebreaker_vk/check_errors.rb', line 5 def input @input end |
Instance Method Details
#validate ⇒ Object
12 13 14 |
# File 'lib/codebreaker_vk/check_errors.rb', line 12 def validate @errors << I18n.t('invalid.include_error') unless check_include?(@input, Console::COMMANDS.values) end |