Class: Presentation::Form::Group

Inherits:
Object
  • Object
show all
Includes:
Presenting::Configurable
Defined in:
lib/presentation/form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Presenting::Configurable

#initialize

Instance Attribute Details

#nameObject

a completely optional group name



54
55
56
# File 'lib/presentation/form.rb', line 54

def name
  @name
end

Instance Method Details

#fieldsObject

the fields in the group



57
58
59
# File 'lib/presentation/form.rb', line 57

def fields
  @fields ||= Presenting::FieldSet.new(Field, :name, :type)
end

#fields=(args) ⇒ Object



60
61
62
63
64
# File 'lib/presentation/form.rb', line 60

def fields=(args)
  args.each do |field|
    fields << field
  end
end