Module: ActionTree::Basic::Helpers

Defined in:
lib/action_tree/basic/helpers.rb

Overview

Contains the default helpers available inside an ActionTree execution scope.

Instance Method Summary collapse

Instance Method Details

#default(key, value) ⇒ Object

Writes a configuration value if it has not been set already



11
12
13
# File 'lib/action_tree/basic/helpers.rb', line 11

def default(key, value)
  @_conf[key] ||= value
end

#set(key, value) ⇒ Object

Writes or overwrites a configuration value



16
17
18
# File 'lib/action_tree/basic/helpers.rb', line 16

def set(key, value)
  @_conf[key] = value
end