Sha256: 224bb9133ee7c3c8bc7f21498863e2b3b4184b140b8d44656fa29c47b2f60286

Contents?: true

Size: 339 Bytes

Versions: 16

Compression:

Stored size: 339 Bytes

Contents

class CMS::Page
  attr_reader :name, :route, :options

  def initialize route, options
    @options = options.reverse_merge({
      editable: true
    })
    @name = route
    @route = (options[:route] || route).dup
  end

  def action
    @action ||= (options[:action] || route).dup
  end

  def editable?
    !options[:static]
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
honey-cms-0.5.1 lib/cms/page.rb
honey-cms-0.4.8 lib/cms/page.rb
honey-cms-0.4.7 lib/cms/page.rb
honey-cms-0.4.6 lib/cms/page.rb
honey-cms-0.4.5 lib/cms/page.rb
honey-cms-0.4.2 lib/cms/page.rb
honey-cms-0.4.1 lib/cms/page.rb
honey-cms-0.4.0 lib/cms/page.rb
honey-cms-0.3.13 lib/cms/page.rb
honey-cms-0.3.12 lib/cms/page.rb
honey-cms-0.3.11 lib/cms/page.rb
honey-cms-0.3.10 lib/cms/page.rb
honey-cms-0.3.9 lib/cms/page.rb
honey-cms-0.3.8 lib/cms/page.rb
honey-cms-0.3.7 lib/cms/page.rb
honey-cms-0.3.5 lib/cms/page.rb