Sha256: 3763f6424cb783ee6f03a51bdc5152ab400d4922fc12ae636e01436fcc6cf65f

Contents?: true

Size: 530 Bytes

Versions: 55

Compression:

Stored size: 530 Bytes

Contents

class BootstrapBuilders::Tab
  attr_accessor :active, :container_html
  attr_reader :ajax_url, :container_id, :label

  def initialize(args)
    @active = args[:active]
    @label = args.fetch(:label)
    @ajax_url = args[:ajax_url]

    if args[:container_id]
      @specific_id_given = true
    else
      @specific_id_given = false
    end

    @container_id = args[:container_id].presence
    @container_id ||= SecureRandom.hex
  end

  def active?
    @active
  end

  def specific_id_given?
    @specific_id_given
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
bootstrap_builders-1.0.4 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.63 lib/bootstrap_builders/tab.rb
bootstrap_builders-1.0.3 lib/bootstrap_builders/tab.rb
bootstrap_builders-1.0.2 lib/bootstrap_builders/tab.rb
bootstrap_builders-1.0.1 lib/bootstrap_builders/tab.rb
bootstrap_builders-1.0.0 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.62 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.61 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.60 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.59 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.58 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.57 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.56 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.55 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.54 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.53 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.52 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.51 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.50 lib/bootstrap_builders/tab.rb
bootstrap_builders-0.0.49 lib/bootstrap_builders/tab.rb