Sha256: 0cd41030463a92dd1f48ee3892c7c47bcaa4a2052522193b9736b50f81bdedd7

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 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

1 entries across 1 versions & 1 rubygems

Version Path
presenting-2.0.0 lib/presentation/details.rb