Class: SheetsDB::Worksheet::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/sheets_db/worksheet/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, column_position:) ⇒ Column

Returns a new instance of Column.



6
7
8
9
# File 'lib/sheets_db/worksheet/column.rb', line 6

def initialize(name:, column_position:)
  @name = name
  @column_position = column_position
end

Instance Attribute Details

#column_positionObject (readonly)

Returns the value of attribute column_position.



4
5
6
# File 'lib/sheets_db/worksheet/column.rb', line 4

def column_position
  @column_position
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/sheets_db/worksheet/column.rb', line 4

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/sheets_db/worksheet/column.rb', line 11

def ==(other)
  other.is_a?(self.class) &&
    other.name == name &&
    other.column_position == column_position
end