Class: RubyXL::Border

Inherits:
OOXMLObject show all
Defined in:
lib/rubyXL/objects/border.rb

Overview

Instance Method Summary collapse

Methods inherited from OOXMLObject

#add_to_zip, #before_write_xml, define_attribute, define_child_node, define_element_name, #dup, filepath, #index_in_collection, #initialize, obtain_class_variable, parse, parse_file, set_countable, set_namespaces, #write_xml

Constructor Details

This class inherits a constructor from RubyXL::OOXMLObject

Instance Method Details

#==(other) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/rubyXL/objects/border.rb', line 40

def ==(other)
  (diagonal_up == other.diagonal_up) &&
    (diagonal_down == other.diagonal_down) &&
    (outline == other.outline) &&
    (left == other.left) &&
    (right == other.right) &&
    (top == other.top) &&
    (bottom == other.bottom) &&
    (diagonal == other.diagonal) &&
    (vertical == other.vertical) &&
    (horizontal == other.horizontal)
end

#get_edge_style(direction) ⇒ Object



31
32
33
34
# File 'lib/rubyXL/objects/border.rb', line 31

def get_edge_style(direction)
  edge = self.send(direction)
  edge && edge.style
end

#set_edge_style(direction, style) ⇒ Object



36
37
38
# File 'lib/rubyXL/objects/border.rb', line 36

def set_edge_style(direction, style)
  self.send("#{direction}=", RubyXL::BorderEdge.new(:style => style))
end