Sha256: cc855a2fd9cfb960eb648df52856b5819b5f738f17fc64903cc73906d26ae3b9

Contents?: true

Size: 743 Bytes

Versions: 7

Compression:

Stored size: 743 Bytes

Contents

module LatoCore

  class Elements::Table::Container::Cell < Cell

    @@requested_args = []

    @@default_args = {
      border: false,
      fixed: false,
      height: nil
    }

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

      set_conditions
    end

    def open
      render 'open.html'
    end
    
    def close
      render 'close.html'
    end

    private

      def set_conditions
        @border_class = @args[:border] ? 'table-border' : ''
        @fixed_class = @args[:fixed] ? 'elements-table--fixed' : ''
        @height_style = @args[:height] ? "height: #{@args[:height]}px" : ''
      end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lato_core-2.2.2 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.2.0 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.1.4 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.1.3 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.1.2 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.1.1 app/cells/lato_core/elements/table/container/cell.rb
lato_core-2.1 app/cells/lato_core/elements/table/container/cell.rb