Class: Spreadsheetkit::Format

Inherits:
Object
  • Object
show all
Defined in:
lib/spreadsheetkit/format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Format

Returns a new instance of Format.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/spreadsheetkit/format.rb', line 6

def initialize(html)
  
  unless html.blank?
    @style = Spreadsheet::Format.new
    
    unless html[:style].blank?
      create_hash_style html[:style]
      @font = Spreadsheetkit::Font.new @style.font, @inline_style
      parse_style
    end
    
    merge html[:colspan]
  end
end

Instance Attribute Details

#inline_styleObject (readonly)

Returns the value of attribute inline_style.



4
5
6
# File 'lib/spreadsheetkit/format.rb', line 4

def inline_style
  @inline_style
end

#styleObject (readonly)

Returns the value of attribute style.



4
5
6
# File 'lib/spreadsheetkit/format.rb', line 4

def style
  @style
end