Class: GoogleDrive::Cell
- Inherits:
-
Object
- Object
- GoogleDrive::Cell
- Defined in:
- lib/google_drive/worksheet_formatting.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#==(other) ⇒ Object
等価性.
- #background_color=(color) ⇒ Object
- #encoding ⇒ Object
-
#initialize(worksheet, row, col, value) ⇒ Cell
constructor
A new instance of Cell.
- #to_s ⇒ Object
Constructor Details
#initialize(worksheet, row, col, value) ⇒ Cell
Returns a new instance of Cell.
8 9 10 11 12 13 |
# File 'lib/google_drive/worksheet_formatting.rb', line 8 def initialize(worksheet, row, col, value) @worksheet = worksheet @row = row @col = col @value = value end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
6 7 8 |
# File 'lib/google_drive/worksheet_formatting.rb', line 6 def col @col end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
6 7 8 |
# File 'lib/google_drive/worksheet_formatting.rb', line 6 def row @row end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/google_drive/worksheet_formatting.rb', line 6 def value @value end |
Instance Method Details
#==(other) ⇒ Object
等価性
18 19 20 21 22 23 24 25 |
# File 'lib/google_drive/worksheet_formatting.rb', line 18 def ==(other) case other when GoogleDrive::Cell @value == other.value else @value == other end end |
#background_color=(color) ⇒ Object
35 36 37 |
# File 'lib/google_drive/worksheet_formatting.rb', line 35 def background_color=(color) @worksheet.set_background_color(@row, @col, 1, 1, color) end |
#encoding ⇒ Object
31 32 33 |
# File 'lib/google_drive/worksheet_formatting.rb', line 31 def encoding @value.respond_to?(:encoding) ? value.encoding : nil end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/google_drive/worksheet_formatting.rb', line 27 def to_s @value.to_s end |