Sha256: ebe7c7110db8aecb7969b8bf5a9e229a499985e1607fb7aaabd4963130f3cc8d

Contents?: true

Size: 417 Bytes

Versions: 29

Compression:

Stored size: 417 Bytes

Contents

class Radiant::AdminUI::RegionPartials
  def initialize(template)
    @partials = Hash.new {|h,k| h[k] = "<strong>`#{k}' default partial not found!</strong>" }
    @template = template
  end
  
  def [](key)
    @partials[key.to_s]
  end
  
  def method_missing(method, *args, &block)
    if block_given?
      @partials[method.to_s] = @template.capture(&block)
    else
      @partials[method.to_s]
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
radiant-1.0.0.rc3 lib/radiant/admin_ui/region_partials.rb
radiant-1.0.0.rc2 lib/radiant/admin_ui/region_partials.rb
radiant-1.0.0.rc1 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.2.4 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.2.2 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.2.1 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.2 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.9 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.8 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.7 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.6 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.5 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.4 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.3 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.2 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1.1 lib/radiant/admin_ui/region_partials.rb
radiantcms-couchrest_model-0.1 lib/radiant/admin_ui/region_partials.rb
radiant-0.7.2 lib/radiant/admin_ui/region_partials.rb
radiant-0.9.1 lib/radiant/admin_ui/region_partials.rb
radiant-0.8.2 lib/radiant/admin_ui/region_partials.rb