Class: Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/surpass/cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



2
3
4
# File 'lib/surpass/cell.rb', line 2

def index
  @index
end

Instance Method Details

#colObject



13
14
15
# File 'lib/surpass/cell.rb', line 13

def col
  @index
end

#rowObject



9
10
11
# File 'lib/surpass/cell.rb', line 9

def row
  @parent
end

#set_style(style) ⇒ Object



4
5
6
7
# File 'lib/surpass/cell.rb', line 4

def set_style(style)
  style = StyleFormat.new(style) if style.is_a?(Hash)
  @format_index = @parent.parent_wb.styles.add(style)
end