Class: OoxmlParser::Border

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(style = nil, color = nil) ⇒ Border

Returns a new instance of Border.



7
8
9
10
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb', line 7

def initialize(style = nil, color = nil)
  @style = style
  @color = color
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



5
6
7
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb', line 5

def color
  @color
end

#styleObject

Returns the value of attribute style.



5
6
7
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb', line 5

def style
  @style
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb', line 12

def ==(other)
  return true if nil? && other.nil?
  return false if nil? && !other.nil?
  return false if !nil? && other.nil?
  return false if style != other.style
  return false if color != other.color
  true
end

#to_sObject



21
22
23
# File 'lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb', line 21

def to_s
  "Border style: #{style}, color: #{color}"
end