module PdfTempura::Document::DefaultCommands
Public Class Methods
included(base)
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 4 def self.included(base) base.send(:attr_accessor, :fields) end
Public Instance Methods
boxed_characters(name, coordinates, height, options = {}, &block)
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 20 def boxed_characters(name, coordinates, height, options = {}, &block) fields << Document::BoxedCharacters.new(name, coordinates, height, @options.merge(options), &block) end
checkbox_field(name, coordinates, dimensions, options = {})
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 12 def checkbox_field(name, coordinates, dimensions, options = {}) fields << Document::CheckboxField.new(name, coordinates, dimensions, @options.merge(options)) end
field_set(name, options = {}, &block)
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 24 def field_set(name, options = {}, &block) fields << Document::FieldSet.new(name, @options.merge(options), &block) end
table(name, coordinates, options = {}, &block)
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 16 def table(name, coordinates, options = {}, &block) fields << Document::Table.new(name, coordinates, @options.merge(options), &block) end
text_field(name, coordinates, dimensions, options = {})
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 8 def text_field(name, coordinates, dimensions, options = {}) fields << Document::TextField.new(name, coordinates, dimensions, @options.merge(options)) end
with_default_options(options = {}, &block)
click to toggle source
# File lib/pdf_tempura/document/default_commands.rb, line 28 def with_default_options(options = {}, &block) previous_options = @options begin @options = @options.merge(options) instance_eval(&block) ensure @options = previous_options end end