Class: RubyXL::CorePropertiesFile

Inherits:
OOXMLTopLevelObject show all
Defined in:
lib/rubyXL/objects/document_properties.rb

Constant Summary collapse

CONTENT_TYPE =
'application/vnd.openxmlformats-package.core-properties+xml'.freeze
REL_TYPE =
'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties'.freeze

Constants inherited from OOXMLTopLevelObject

OOXMLTopLevelObject::ROOT, OOXMLTopLevelObject::SAVE_ORDER

Instance Attribute Summary collapse

Attributes inherited from OOXMLTopLevelObject

#root

Attributes included from OOXMLObjectInstanceMethods

#local_namespaces

Instance Method Summary collapse

Methods inherited from OOXMLTopLevelObject

#add_to_zip, #file_index, parse_file, set_namespaces

Methods included from OOXMLObjectInstanceMethods

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

Instance Attribute Details

#workbookObject

Returns the value of attribute workbook.



93
94
95
# File 'lib/rubyXL/objects/document_properties.rb', line 93

def workbook
  @workbook
end

Instance Method Details

#created_atObject



139
140
141
# File 'lib/rubyXL/objects/document_properties.rb', line 139

def created_at
  dcterms_created && dcterms_created.to_time
end

#created_at=(v) ⇒ Object



143
144
145
# File 'lib/rubyXL/objects/document_properties.rb', line 143

def created_at=(v)
  self.dcterms_created = RubyXL::StringNodeW3C.default(v)
end

#creatorObject



123
124
125
# File 'lib/rubyXL/objects/document_properties.rb', line 123

def creator
  dc_creator && dc_creator.value
end

#creator=(v) ⇒ Object



127
128
129
# File 'lib/rubyXL/objects/document_properties.rb', line 127

def creator=(v)
  self.dc_creator = v && RubyXL::StringNode.new(:value => v)
end

#modified_atObject



147
148
149
# File 'lib/rubyXL/objects/document_properties.rb', line 147

def modified_at
  dcterms_modified && dcterms_modified.to_time
end

#modified_at=(v) ⇒ Object



151
152
153
# File 'lib/rubyXL/objects/document_properties.rb', line 151

def modified_at=(v)
  self.dcterms_modified = RubyXL::StringNodeW3C.default(v)
end

#modifierObject



131
132
133
# File 'lib/rubyXL/objects/document_properties.rb', line 131

def modifier
  cp_last_modified_by && cp_last_modified_by.value
end

#modifier=(v) ⇒ Object



135
136
137
# File 'lib/rubyXL/objects/document_properties.rb', line 135

def modifier=(v)
  self.cp_last_modified_by = v && RubyXL::StringNode.new(:value => v)
end

#xlsx_pathObject



119
120
121
# File 'lib/rubyXL/objects/document_properties.rb', line 119

def xlsx_path
  ROOT.join('docProps', 'core.xml')
end