diff options
| author | Randy Morgan <[email protected]> | 2013-01-10 18:39:14 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-01-10 18:39:14 +0900 |
| commit | 8f76f395b6d233827e29104052c3d775a5c885ad (patch) | |
| tree | 12453a9145cd41e44d16ad018350d3418724f193 | |
| parent | 41fec1cf9993d351eb5d5961930789b36fe66316 (diff) | |
| download | caxlsx-8f76f395b6d233827e29104052c3d775a5c885ad.tar.gz caxlsx-8f76f395b6d233827e29104052c3d775a5c885ad.zip | |
added documentation for trust_input and gemspec update.
| -rw-r--r-- | axlsx.gemspec | 2 | ||||
| -rw-r--r-- | lib/axlsx.rb | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/axlsx.gemspec b/axlsx.gemspec index bb5c4881..511b1c16 100644 --- a/axlsx.gemspec +++ b/axlsx.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.summary = "excel OOXML (xlsx) with charts, styles, images and autowidth columns." s.has_rdoc = 'axlsx' s.description = <<-eof - xlsx spreadsheet generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx helps you create beautiful Office Open XML Spreadsheet documents ( Excel, Google Spreadsheet, Numbers, LibreOffice) without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine. + xlsx spreadsheet generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx helps you create beautiful Office Open XML Spreadsheet documents ( Excel, Google Spreadsheets, Numbers, LibreOffice) without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine. eof s.files = Dir.glob("{lib/**/*,examples/**/*.rb,examples/**/*.jpeg}") + %w{ LICENSE README.md Rakefile CHANGELOG.md .yardopts } s.test_files = Dir.glob("{test/**/*}") diff --git a/lib/axlsx.rb b/lib/axlsx.rb index c5fcfed0..ed7a141f 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -124,10 +124,19 @@ module Axlsx s = s.capitalize if all_caps s.gsub(/_(.)/){ $1.upcase } end + + + # Instructs the serializer to not try to escape cell value input. + # This will give you a huge speed bonus, but if you content has <, > or other xml character data + # the workbook will be invalid and excel will complain. def self.trust_input @trust_input ||= false end - def self.trust_input=(v) - @trust_input=v + + # @param[Boolean] trust_me A boolean value indicating if the cell value content is to be trusted + # @return [Boolean] + # @see Axlsx::trust_input + def self.trust_input=(trust_me) + @trust_input = trust_me end end |
