Sha256: cd4e95419c489e4c44b2d530bb00aa6b3c6271e48563d5b2f03ba3ff9f8244fb

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

module LatoCore

  class Elements::Block::Cell < Cell

    @@requested_args = []

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

    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

3 entries across 3 versions & 1 rubygems

Version Path
lato_core-2.2.2 app/cells/lato_core/elements/block/cell.rb
lato_core-2.2.0 app/cells/lato_core/elements/block/cell.rb
lato_core-2.1.4 app/cells/lato_core/elements/block/cell.rb