Class: SportDb::Parser::GoalLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/sportdb/parser/parse_tree-match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#goalsObject

Returns the value of attribute goals

Returns:

  • (Object)

    the current value of goals



95
96
97
# File 'lib/sportdb/parser/parse_tree-match.rb', line 95

def goals
  @goals
end

Instance Method Details

#as_jsonObject



97
98
99
# File 'lib/sportdb/parser/parse_tree-match.rb', line 97

def as_json(*)
  ['<GoalLine>', { 'goals' => goals.as_json }]
end

#pretty_print(q) ⇒ Object



101
102
103
104
105
106
# File 'lib/sportdb/parser/parse_tree-match.rb', line 101

def pretty_print( q )
  q.group( 4, '<GoalLine ', '>') do
    q.text( "goals=" )
    q.pp( goals )
  end
end