Class: Fbtxt::Parser::MatchLine
- Defined in:
- lib/fbtxt/parser/parse_tree-match.rb
Overview
tty = TELETYPE MODE for teams and score!!
Instance Attribute Summary collapse
-
#att ⇒ Object
Returns the value of attribute att.
-
#date ⇒ Object
Returns the value of attribute date.
-
#geo ⇒ Object
Returns the value of attribute geo.
-
#header ⇒ Object
Returns the value of attribute header.
-
#neutral ⇒ Object
Returns the value of attribute neutral.
-
#note ⇒ Object
Returns the value of attribute note.
-
#num ⇒ Object
Returns the value of attribute num.
-
#round_inline_big ⇒ Object
Returns the value of attribute round_inline_big.
-
#round_inline_short ⇒ Object
Returns the value of attribute round_inline_short.
-
#score ⇒ Object
Returns the value of attribute score.
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_inline ⇒ Object
Returns the value of attribute status_inline.
-
#status_note ⇒ Object
Returns the value of attribute status_note.
-
#team1 ⇒ Object
Returns the value of attribute team1.
-
#team2 ⇒ Object
Returns the value of attribute team2.
-
#time ⇒ Object
Returns the value of attribute time.
-
#time_local ⇒ Object
Returns the value of attribute time_local.
-
#tty ⇒ Object
Returns the value of attribute tty.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
Instance Attribute Details
#att ⇒ Object
Returns the value of attribute att
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def att @att end |
#date ⇒ Object
Returns the value of attribute date
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def date @date end |
#geo ⇒ Object
Returns the value of attribute geo
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def geo @geo end |
#header ⇒ Object
Returns the value of attribute header
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def header @header end |
#neutral ⇒ Object
Returns the value of attribute neutral
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def neutral @neutral end |
#note ⇒ Object
Returns the value of attribute note
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def note @note end |
#num ⇒ Object
Returns the value of attribute num
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def num @num end |
#round_inline_big ⇒ Object
Returns the value of attribute round_inline_big
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def round_inline_big @round_inline_big end |
#round_inline_short ⇒ Object
Returns the value of attribute round_inline_short
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def round_inline_short @round_inline_short end |
#score ⇒ Object
Returns the value of attribute score
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def score @score end |
#status ⇒ Object
Returns the value of attribute status
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def status @status end |
#status_inline ⇒ Object
Returns the value of attribute status_inline
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def status_inline @status_inline end |
#status_note ⇒ Object
Returns the value of attribute status_note
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def status_note @status_note end |
#team1 ⇒ Object
Returns the value of attribute team1
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def team1 @team1 end |
#team2 ⇒ Object
Returns the value of attribute team2
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def team2 @team2 end |
#time ⇒ Object
Returns the value of attribute time
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def time @time end |
#time_local ⇒ Object
Returns the value of attribute time_local
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def time_local @time_local end |
#tty ⇒ Object
Returns the value of attribute tty
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def tty @tty end |
#year ⇒ Object
Returns the value of attribute year
48 49 50 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 48 def year @year end |
Instance Method Details
#as_json ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 60 def as_json(*) h = { 'team1' => team1.as_json, 'team2' => team2.as_json, } members.zip(values) do |name, value| next if [:team1, :team2].include?( name ) next if value.nil? h[name.to_s] = value.as_json end ['<MatchLine>', h] end |
#pretty_print(q) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/fbtxt/parser/parse_tree-match.rb', line 76 def pretty_print( q ) q.group( 4, '<MatchLine ', '>') do ## group( indent, open, close) q.text( "#{team1} v #{team2}") members.zip(values) do |name, value| next if [:team1, :team2].include?( name ) next if value.nil? q.breakable q.text( "#{name}=" ) q.pp( value ) end end end |