Class: Game::CodeMaker
- Inherits:
-
Object
- Object
- Game::CodeMaker
- Defined in:
- lib/codebreaker/game/code_maker.rb
Constant Summary collapse
- CODE_DIGITS_COUNT =
4
- CODE_VALUE_MIN =
1
- CODE_VALUE_MAX =
6
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize ⇒ CodeMaker
constructor
A new instance of CodeMaker.
Constructor Details
#initialize ⇒ CodeMaker
Returns a new instance of CodeMaker.
9 10 11 |
# File 'lib/codebreaker/game/code_maker.rb', line 9 def initialize @code = generate_code end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
7 8 9 |
# File 'lib/codebreaker/game/code_maker.rb', line 7 def code @code end |