Class: Tributa::HtmlToTributaTableTransformer

Inherits:
Object
  • Object
show all
Defined in:
lib/tributa/html_to_tributa_table_transformer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ HtmlToTributaTableTransformer

Returns a new instance of HtmlToTributaTableTransformer.



9
10
11
# File 'lib/tributa/html_to_tributa_table_transformer.rb', line 9

def initialize(html)
  @html = html
end

Instance Attribute Details

#htmlObject (readonly)

Returns the value of attribute html.



7
8
9
# File 'lib/tributa/html_to_tributa_table_transformer.rb', line 7

def html
  @html
end

Instance Method Details

#to_tributa_tableObject



13
14
15
# File 'lib/tributa/html_to_tributa_table_transformer.rb', line 13

def to_tributa_table
  Tributa::Table.new(rows)
end