Class: Axlsx::App
- Inherits:
-
Object
- Object
- Axlsx::App
- Includes:
- OptionsParser
- Defined in:
- lib/axlsx/doc_props/app.rb
Overview
Support is not implemented for the following complex types:
HeadingPairs (VectorVariant), TitlesOfParts (VectorLpstr), HLinks (VectorVariant), DigSig (DigSigBlob)
App represents the app.xml document. The attributes for this object are primarily managed by the application the end user uses to edit the document. None of the attributes are required to serialize a valid xlsx object.
Instance Attribute Summary collapse
-
#app_version ⇒ String
(also: #AppVersion)
The version of the application.
-
#application ⇒ String
(also: #Application)
readonly
The name of the application.
-
#characters ⇒ Integer
(also: #Characters)
The number of characters in the document.
-
#characters_with_spaces ⇒ Integer
(also: #CharactersWithSpaces)
The number of characters in the document including spaces.
-
#company ⇒ String
(also: #Company)
The name of the company generating the document.
-
#doc_security ⇒ Integer
(also: #DocSecurity)
Document security.
-
#hidden_slides ⇒ Integer
(also: #HiddenSlides)
The number of hidden slides.
-
#hyperlink_base ⇒ String
(also: #HyperlinkBase)
The base for hyper links in the document.
-
#hyperlinks_changed ⇒ Boolean
(also: #HyperlinksChanged)
Indicates that the hyper links in the document have been changed.
-
#lines ⇒ Integer
(also: #Lines)
The number of lines in the document.
-
#links_up_to_date ⇒ Boolean
(also: #LinksUpToDate)
The links in the document are up to date.
-
#m_m_clips ⇒ Integer
(also: #MMClips)
The total number multimedia clips.
-
#manager ⇒ String
(also: #Manager)
The name of the manager for the document.
-
#notes ⇒ Integer
(also: #Notes)
The number of slides that have notes.
-
#pages ⇒ Integer
(also: #Pages)
The number of pages in the document.
-
#paragraphs ⇒ Integer
(also: #Paragraphs)
The number of paragraphs in the document.
-
#presentation_format ⇒ String
(also: #PresentationFormat)
The intended format of the presentation.
-
#scale_crop ⇒ Boolean
(also: #ScaleCrop)
The display mode for the document thumbnail.
-
#shared_doc ⇒ Boolean
(also: #SharedDoc)
Indicates if the document is shared.
-
#slides ⇒ Integer
(also: #Slides)
The number of slides in the document.
-
#template ⇒ String
(also: #Template)
The name of the document template.
-
#total_time ⇒ Integer
(also: #TotalTime)
The total amount of time spent editing.
-
#words ⇒ Integer
(also: #Words)
The number of words in the document.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ App
constructor
Creates an App object.
-
#to_xml_string(str = +'')) ⇒ String
Serialize the app.xml document.
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ App
Creates an App object
38 39 40 |
# File 'lib/axlsx/doc_props/app.rb', line 38 def initialize( = {}) end |
Instance Attribute Details
#app_version ⇒ String Also known as: AppVersion
Returns The version of the application.
127 128 129 |
# File 'lib/axlsx/doc_props/app.rb', line 127 def app_version @app_version end |
#application ⇒ String (readonly) Also known as: Application
Returns The name of the application.
123 124 125 |
# File 'lib/axlsx/doc_props/app.rb', line 123 def application @application end |
#characters ⇒ Integer Also known as: Characters
Returns The number of characters in the document.
63 64 65 |
# File 'lib/axlsx/doc_props/app.rb', line 63 def characters @characters end |
#characters_with_spaces ⇒ Integer Also known as: CharactersWithSpaces
Returns The number of characters in the document including spaces.
107 108 109 |
# File 'lib/axlsx/doc_props/app.rb', line 107 def characters_with_spaces @characters_with_spaces end |
#company ⇒ String Also known as: Company
Returns The name of the company generating the document.
51 52 53 |
# File 'lib/axlsx/doc_props/app.rb', line 51 def company @company end |
#doc_security ⇒ Integer Also known as: DocSecurity
Returns Document security.
131 132 133 |
# File 'lib/axlsx/doc_props/app.rb', line 131 def doc_security @doc_security end |
#hidden_slides ⇒ Integer Also known as: HiddenSlides
Returns The number of hidden slides.
91 92 93 |
# File 'lib/axlsx/doc_props/app.rb', line 91 def @hidden_slides end |
#hyperlink_base ⇒ String Also known as: HyperlinkBase
Returns The base for hyper links in the document.
115 116 117 |
# File 'lib/axlsx/doc_props/app.rb', line 115 def hyperlink_base @hyperlink_base end |
#hyperlinks_changed ⇒ Boolean Also known as: HyperlinksChanged
Returns Indicates that the hyper links in the document have been changed.
119 120 121 |
# File 'lib/axlsx/doc_props/app.rb', line 119 def hyperlinks_changed @hyperlinks_changed end |
#lines ⇒ Integer Also known as: Lines
Returns The number of lines in the document.
71 72 73 |
# File 'lib/axlsx/doc_props/app.rb', line 71 def lines @lines end |
#links_up_to_date ⇒ Boolean Also known as: LinksUpToDate
Returns The links in the document are up to date.
103 104 105 |
# File 'lib/axlsx/doc_props/app.rb', line 103 def links_up_to_date @links_up_to_date end |
#m_m_clips ⇒ Integer Also known as: MMClips
Returns The total number multimedia clips.
95 96 97 |
# File 'lib/axlsx/doc_props/app.rb', line 95 def m_m_clips @m_m_clips end |
#manager ⇒ String Also known as: Manager
Returns The name of the manager for the document.
47 48 49 |
# File 'lib/axlsx/doc_props/app.rb', line 47 def manager @manager end |
#notes ⇒ Integer Also known as: Notes
Returns The number of slides that have notes.
83 84 85 |
# File 'lib/axlsx/doc_props/app.rb', line 83 def notes @notes end |
#pages ⇒ Integer Also known as: Pages
Returns The number of pages in the document.
55 56 57 |
# File 'lib/axlsx/doc_props/app.rb', line 55 def pages @pages end |
#paragraphs ⇒ Integer Also known as: Paragraphs
Returns The number of paragraphs in the document.
75 76 77 |
# File 'lib/axlsx/doc_props/app.rb', line 75 def paragraphs @paragraphs end |
#presentation_format ⇒ String Also known as: PresentationFormat
Returns The intended format of the presentation.
67 68 69 |
# File 'lib/axlsx/doc_props/app.rb', line 67 def presentation_format @presentation_format end |
#scale_crop ⇒ Boolean Also known as: ScaleCrop
Returns The display mode for the document thumbnail.
99 100 101 |
# File 'lib/axlsx/doc_props/app.rb', line 99 def scale_crop @scale_crop end |
#shared_doc ⇒ Boolean Also known as:
Returns Indicates if the document is shared.
111 112 113 |
# File 'lib/axlsx/doc_props/app.rb', line 111 def shared_doc @shared_doc end |
#slides ⇒ Integer Also known as: Slides
Returns The number of slides in the document.
79 80 81 |
# File 'lib/axlsx/doc_props/app.rb', line 79 def @slides end |
#template ⇒ String Also known as: Template
Returns The name of the document template.
43 44 45 |
# File 'lib/axlsx/doc_props/app.rb', line 43 def template @template end |
#total_time ⇒ Integer Also known as: TotalTime
Returns The total amount of time spent editing.
87 88 89 |
# File 'lib/axlsx/doc_props/app.rb', line 87 def total_time @total_time end |
#words ⇒ Integer Also known as: Words
Returns The number of words in the document.
59 60 61 |
# File 'lib/axlsx/doc_props/app.rb', line 59 def words @words end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serialize the app.xml document
289 290 291 292 293 294 295 296 297 |
# File 'lib/axlsx/doc_props/app.rb', line 289 def to_xml_string(str = +'') str << '<?xml version="1.0" encoding="UTF-8"?>' str << '<Properties xmlns="' << APP_NS << '" xmlns:vt="' << APP_NS_VT << '">' Axlsx.instance_values_for(self).each do |key, value| node_name = Axlsx.camel(key) str << "<#{node_name}>#{value}</#{node_name}>" end str << '</Properties>' end |