class Bchess::PGN::Game
Attributes
body[RW]
header[RW]
moves[RW]
Public Class Methods
new(parsed_game)
click to toggle source
# File lib/pgn/game.rb, line 6 def initialize(parsed_game) @header = Bchess::PGN::GameHeader.new(parsed_game.elements.first) @body = Bchess::PGN::GameBody.new(parsed_game.elements.last) end
Public Instance Methods
convert_body_to_moves()
click to toggle source
# File lib/pgn/game.rb, line 11 def convert_body_to_moves body.extract_moves @moves = body.moves true end