Class: OoxmlParser::Office2010ChartStyle

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_style/office_2010_chart_style.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#style_numberObject

Returns the value of attribute style_number.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_style/office_2010_chart_style.rb', line 4

def style_number
  @style_number
end

Class Method Details

.parse(chart_style_node) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_style/office_2010_chart_style.rb', line 6

def self.parse(chart_style_node)
  chart_style = Office2010ChartStyle.new
  chart_style_node.xpath('*').each do |chart_style_node_child|
    case chart_style_node_child.name
    when 'style'
      chart_style.style_number = chart_style_node_child.attribute('val').value.to_i
    end
  end
  chart_style
end