Sha256: c4b97ef5dcb6a9509b35a89003f11b8d8f363a19679c0a62c06bef3da407b074

Contents?: true

Size: 892 Bytes

Versions: 3

Compression:

Stored size: 892 Bytes

Contents

require 'clevic/field_valuer.rb'

module Clevic

# This has both a field and an entity, so it's a perfect candidate
# for including FieldValuer, which it does.
class Delegate
  include FieldValuer

  def initialize( field )
    @field = field
  end
  
  attr_accessor :entity, :parent
  
  attr_reader :field
  def attribute
    field.attribute
  end
  
  def entity_class
    field.entity_class
  end
  
  def find_options
    field.find_options
  end
  
  def is_combo?
    false
  end
  
  # change the visual state of the editor to the biggest / most
  # space-consuming it can be. This grew out of combo boxes having
  # a drop-down that can show or hide.
  def full_edit
  end
  
  # change the visual state of the editor to the smallest / least
  # space-consuming it can be. This grew out of combo boxes having
  # a drop-down that can show or hide.
  def minimal_edit
  end
end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clevic-0.13.0.b3 lib/clevic/delegate.rb
clevic-0.13.0.b2 lib/clevic/delegate.rb
clevic-0.13.0.b1 lib/clevic/delegate.rb