Class: PDFRavager::Fieldsets::CheckboxGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf_ravager/fieldsets/checkbox_group.rb

Instance Method Summary collapse

Constructor Details

#initialize(template, name) {|_self| ... } ⇒ CheckboxGroup

Returns a new instance of CheckboxGroup.

Yields:

  • (_self)

Yield Parameters:



5
6
7
8
# File 'lib/pdf_ravager/fieldsets/checkbox_group.rb', line 5

def initialize(template, name)
  @template, @name = template, name
  yield self if block_given?
end

Instance Method Details

#check(name, opts = {}) ⇒ Object



10
11
12
# File 'lib/pdf_ravager/fieldsets/checkbox_group.rb', line 10

def check(name, opts={})
  @template.check("#{@name}.#{name}", opts)
end

#uncheck(name, opts = {}) ⇒ Object



14
15
16
# File 'lib/pdf_ravager/fieldsets/checkbox_group.rb', line 14

def uncheck(name, opts={})
  @template.uncheck("#{@name}.#{name}", opts)
end