Sha256: cdb54ece4feb4e5cf70b4481c84e86517ac24d2ae9c554ca6e6d16ab25510288

Contents?: true

Size: 559 Bytes

Versions: 5

Compression:

Stored size: 559 Bytes

Contents

require 'presentation/grid'

module Presentation
  # TODO: abstract what's common between Record and Grid into a shared module or reusable objects or something
  class Details < Grid
    def iname; :details end
    
    # The display title for this presentation. Will default based on the id.
    attr_accessor :title
    
    def fields=(args)
      args.each do |field|
        self.fields << field
      end
    end
    
    def fields
      @fields ||= Presenting::FieldSet.new(Presenting::Attribute, :name, :value)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
presenting-3.0.0 lib/presentation/details.rb
presenting-2.1.0 lib/presentation/details.rb
presenting-2.0.3 lib/presentation/details.rb
presenting-2.0.2 lib/presentation/details.rb
presenting-2.0.1 lib/presentation/details.rb