Class: UltimateTurboModal::Configuration::BaseConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/ultimate_turbo_modal/configuration.rb

Overview

Shared base for modal and drawer configuration

Direct Known Subclasses

ConfirmConfig, DrawerConfig, ModalConfig

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#advanceObject

Returns the value of attribute advance.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def advance
  @advance
end

#close_buttonObject (readonly)

Returns the value of attribute close_button.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def close_button
  @close_button
end

#close_on_submitObject (readonly)

Returns the value of attribute close_on_submit.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def close_on_submit
  @close_on_submit
end

Returns the value of attribute footer_divider.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def footer_divider
  @footer_divider
end

#headerObject (readonly)

Returns the value of attribute header.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def header
  @header
end

#header_dividerObject (readonly)

Returns the value of attribute header_divider.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def header_divider
  @header_divider
end

#overlayObject (readonly)

Returns the value of attribute overlay.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def overlay
  @overlay
end

#paddingObject

Returns the value of attribute padding.



50
51
52
# File 'lib/ultimate_turbo_modal/configuration.rb', line 50

def padding
  @padding
end

Class Method Details

.boolean_option(name) ⇒ Object



52
53
54
55
56
57
# File 'lib/ultimate_turbo_modal/configuration.rb', line 52

def self.boolean_option(name)
  define_method(:"#{name}=") do |value|
    raise ArgumentError, "Value must be a boolean." unless [true, false].include?(value)
    instance_variable_set(:"@#{name}", value)
  end
end