Sha256: 525bff5c9a55d6aa9e60cb16bf7dd8a5d4a08f13e7bd85369b6871d270c58020

Contents?: true

Size: 374 Bytes

Versions: 16

Compression:

Stored size: 374 Bytes

Contents

module Arbre
  class Component < Arbre::HTML::Div

    # By default components render a div
    def tag_name
      'div'
    end

    def initialize(*)
      super
      add_class default_class_name
    end

    protected

    # By default, add a css class named after the ruby class
    def default_class_name
      self.class.name.demodulize.underscore
    end

  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/component.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/component.rb
arbre-1.4.0 lib/arbre/component.rb
arbre-1.3.0 lib/arbre/component.rb
arbre-1.2.1 lib/arbre/component.rb
arbre-1.2.0 lib/arbre/component.rb
arbre-1.2.0.rc1 lib/arbre/component.rb
arbre-1.1.1 lib/arbre/component.rb
arbre-1.0.3 lib/arbre/component.rb
arbre-1.0.2 lib/arbre/component.rb
arbre-1.0.1 lib/arbre/component.rb
arbre-1.0.0 lib/arbre/component.rb
arbre-1.0.0.rc4 lib/arbre/component.rb
arbre-1.0.0.rc3 lib/arbre/component.rb
arbre-1.0.0.rc2 lib/arbre/component.rb
arbre-1.0.0.rc1 lib/arbre/component.rb