Class: RubyXL::Border

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

Overview

Instance Attribute Summary

Attributes included from OOXMLObjectInstanceMethods

#local_namespaces

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

#==, #before_write_xml, included, #index_in_collection, #initialize, #write_xml

Instance Method Details

#get_edge_color(direction) ⇒ Object



47
48
49
50
# File 'lib/rubyXL/objects/border.rb', line 47

def get_edge_color(direction)
  edge = self.send(direction)
  edge && edge.get_rgb_color
end

#get_edge_style(direction) ⇒ Object



33
34
35
36
# File 'lib/rubyXL/objects/border.rb', line 33

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

#set_edge_color(direction, color) ⇒ Object



52
53
54
55
56
57
58
59
60
# File 'lib/rubyXL/objects/border.rb', line 52

def set_edge_color(direction, color)
  edge = self.send(direction)
  if edge
    edge.set_rgb_color(color)
  else
    self.send("#{direction}=", RubyXL::BorderEdge.new)
    self.send(direction).set_rgb_color(color)
  end
end

#set_edge_style(direction, style) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/rubyXL/objects/border.rb', line 38

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