Class: Mural::Widget::Table

Inherits:
Object
  • Object
show all
Includes:
Codec
Defined in:
lib/mural/widget/table.rb

Defined Under Namespace

Classes: Column, Row, Style

Class Method Summary collapse

Methods included from Codec

#encode, included

Class Method Details

.decode(json) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/mural/widget/table.rb', line 28

def self.decode(json)
  super.tap do |table|
    table.columns&.map! { |col| Column.decode(col) }
    table.rows&.map! { |row| Row.decode(row) }
    table.style = Style.decode(table.style)
  end
end