Sha256: f7846f9c5321b12315872d9440aa599d5e47ebf290977adda08e0a0275b5b6b2

Contents?: true

Size: 389 Bytes

Versions: 13

Compression:

Stored size: 389 Bytes

Contents

module Spina::Pages
  class NewPageButtonComponent < Spina::ApplicationComponent
    attr_reader :view_templates, :resource
    
    def initialize(view_templates = [], resource: nil)
      @view_templates = view_templates
      @resource = resource
    end
    
    def view_template
      view_templates.first
    end
    
    def render?
      view_templates.any?
    end
    
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spina-2.12.0 app/components/spina/pages/new_page_button_component.rb
spina-2.11.0 app/components/spina/pages/new_page_button_component.rb
spina-2.10.0 app/components/spina/pages/new_page_button_component.rb
spina-2.9.1 app/components/spina/pages/new_page_button_component.rb
spina-2.9.0 app/components/spina/pages/new_page_button_component.rb
spina-2.8.1 app/components/spina/pages/new_page_button_component.rb
spina-2.8.0 app/components/spina/pages/new_page_button_component.rb
spina-2.7.0 app/components/spina/pages/new_page_button_component.rb
spina-2.6.2 app/components/spina/pages/new_page_button_component.rb
spina-2.6.1 app/components/spina/pages/new_page_button_component.rb
spina-2.6.0 app/components/spina/pages/new_page_button_component.rb
spina-2.5.0 app/components/spina/pages/new_page_button_component.rb
spina-2.4.0 app/components/spina/pages/new_page_button_component.rb