Class: TurboFlash::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
14
15
# File 'lib/turbo_flash/configuration.rb', line 7

def initialize
  @target = 'flash'
  @action = :update
  @partial = 'shared/flash'
  @key = :role
  @value = :message
  @clear_target_unless_flashed = true
  @inherit_flashes = true
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def action
  @action
end

#clear_unless_flashedObject

Returns the value of attribute clear_unless_flashed.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def clear_unless_flashed
  @clear_unless_flashed
end

#inherit_flashesObject

Returns the value of attribute inherit_flashes.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def inherit_flashes
  @inherit_flashes
end

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def key
  @key
end

#partialObject

Returns the value of attribute partial.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def partial
  @partial
end

#targetObject

Returns the value of attribute target.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def target
  @target
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/turbo_flash/configuration.rb', line 5

def value
  @value
end

Instance Method Details

#clear_target_unless_flashed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/turbo_flash/configuration.rb', line 21

def clear_target_unless_flashed?
  @clear_target_unless_flashed
end

#inherit_flashes?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/turbo_flash/configuration.rb', line 17

def inherit_flashes?
  @inherit_flashes
end