Sha256: ef6dcd5078246392275590865f857e42b06b63fc8992c0d9bc07fe118b1769f3
Contents?: true
Size: 520 Bytes
Versions: 8
Compression:
Stored size: 520 Bytes
Contents
module CmAdmin module Models class CmShowSection attr_accessor :section_name, :available_section_fields, :display_if def initialize(section_name, display_if, &block) @available_section_fields = [] @section_name = section_name @display_if = display_if || lambda { |arg| return true } instance_eval(&block) end def field(field_name, options={}) @available_section_fields << CmAdmin::Models::Field.new(field_name, options) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems