Sha256: aa9caf804d75019545daccde1ab83591ba4738945fa733f5d68cedaea999af31

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

require 'delegate'

module PropertySets
  class FormBuilderProxy < Delegator
    attr_accessor :builder
    attr_accessor :property_set

    def initialize(property_set, builder)
      self.property_set = property_set
      self.builder      = builder
    end

    def __getobj__
      builder
    end

    def check_box(property, options = {}, checked_value = "1", unchecked_value = "0")
      builder.property_set_check_box(property_set, property, options, checked_value, unchecked_value)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
property_sets-0.1.0 lib/property_sets/form_builder_proxy.rb
property_sets-0.0.12 lib/property_sets/form_builder_proxy.rb