-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e3d973
commit d459459
Showing
10 changed files
with
81 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...arser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module OoxmlParser | ||
# Class for storing Suffix `w:suff` | ||
# This element specifies the content which | ||
# shall be added between a given numbering level's text and the text of | ||
# every numbered paragraph which references that numbering level. | ||
# If this element is omitted, then its value shall be assumed to be tab. | ||
# >ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference 17.9.29. | ||
class Suffix < OOXMLDocumentObject | ||
# @return [String] value of suffix | ||
attr_accessor :value | ||
|
||
def initialize(value = :tab, | ||
parent: nil) | ||
@value = value | ||
@parent = parent | ||
end | ||
|
||
# Parse Suffix | ||
# @param [Nokogiri::XML:Node] node with Suffix | ||
# @return [Suffix] result of parsing | ||
def parse(node) | ||
node.attributes.each do |key, value| | ||
case key | ||
when 'val' | ||
@value = value.value.to_sym | ||
end | ||
end | ||
self | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
...rser/docx_data/document_structure/numbering/numbering_definition/abstract_numbering_id.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
module OoxmlParser | ||
# Class for storing AbstractNumberingId | ||
class AbstractNumberingId | ||
class AbstractNumberingId < OOXMLDocumentObject | ||
# @return [String] value of start | ||
attr_accessor :value | ||
|
||
# Parse AbstractNumberingId | ||
# @param [Nokogiri::XML:Node] node with AbstractNumberingId | ||
# @return [AbstractNumberingId] result of parsing | ||
def self.parse(node) | ||
abstract_id = AbstractNumberingId.new | ||
|
||
def parse(node) | ||
node.attributes.each do |key, value| | ||
case key | ||
when 'val' | ||
abstract_id.value = value.value.to_i | ||
@value = value.value.to_i | ||
end | ||
end | ||
abstract_id | ||
self | ||
end | ||
end | ||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters