Class: RubyHoldem::Round::MoveFactory
- Inherits:
-
Object
- Object
- RubyHoldem::Round::MoveFactory
- Defined in:
- lib/ruby_holdem/round/move_factory.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#move_type ⇒ Object
readonly
Returns the value of attribute move_type.
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#round ⇒ Object
readonly
Returns the value of attribute round.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(round, player, move_type, amount) ⇒ MoveFactory
constructor
A new instance of MoveFactory.
Constructor Details
#initialize(round, player, move_type, amount) ⇒ MoveFactory
Returns a new instance of MoveFactory.
6 7 8 9 10 11 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 6 def initialize(round, player, move_type, amount) @round = round @player = player @move_type = move_type @amount = amount end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 4 def amount @amount end |
#move_type ⇒ Object (readonly)
Returns the value of attribute move_type.
4 5 6 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 4 def move_type @move_type end |
#player ⇒ Object (readonly)
Returns the value of attribute player.
4 5 6 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 4 def player @player end |
#round ⇒ Object (readonly)
Returns the value of attribute round.
4 5 6 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 4 def round @round end |
Instance Method Details
#build ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ruby_holdem/round/move_factory.rb', line 13 def build { player: player, stage: stage, move_type: move_type, amount: actual_amount } end |