Sha256: 4e30110ae87495b6b6164c60323ed9fd07c1dedd95850becf428c4856b62a43f

Contents?: true

Size: 646 Bytes

Versions: 4

Compression:

Stored size: 646 Bytes

Contents

module LatoCore

  class Elements::Block::Cell < Cell

    @@requested_args = []

    @@default_args = {
      class: 'md-12',
      round: true
    }

    def initialize(args = {})
      @args = validate_args(
        args: args,
        requested_args: @@requested_args,
        default_args: @@default_args
      )

      set_conditions
    end

    def open(custom_class: nil)
      @args[:class] = custom_class if custom_class
      render 'open.html'
    end
    
    def close
      render 'close.html'
    end

    private

      def set_conditions
        @round_class = @args[:round] ? 'elements-block--round' : ''
      end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lato_core-2.1.3 app/cells/lato_core/elements/block/cell.rb
lato_core-2.1.2 app/cells/lato_core/elements/block/cell.rb
lato_core-2.1.1 app/cells/lato_core/elements/block/cell.rb
lato_core-2.1 app/cells/lato_core/elements/block/cell.rb