Class: Bchess::PGN::Game
- Inherits:
-
Object
- Object
- Bchess::PGN::Game
- Defined in:
- lib/pgn/game.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#header ⇒ Object
Returns the value of attribute header.
-
#moves ⇒ Object
Returns the value of attribute moves.
Instance Method Summary collapse
- #convert_body_to_moves ⇒ Object
-
#initialize(parsed_game) ⇒ Game
constructor
A new instance of Game.
Constructor Details
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/pgn/game.rb', line 4 def body @body end |
#header ⇒ Object
Returns the value of attribute header.
4 5 6 |
# File 'lib/pgn/game.rb', line 4 def header @header end |
#moves ⇒ Object
Returns the value of attribute moves.
4 5 6 |
# File 'lib/pgn/game.rb', line 4 def moves @moves end |
Instance Method Details
#convert_body_to_moves ⇒ Object
11 12 13 14 15 |
# File 'lib/pgn/game.rb', line 11 def convert_body_to_moves body.extract_moves @moves = body.moves true end |