Top Level Namespace

Defined Under Namespace

Modules: AktionCap

Instance Method Summary collapse

Instance Method Details

#append(name, values) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/aktion_cap/recipe/base.rb', line 5

def append(name, values)
  if exists? name
    raise "set_append requires an array value to append to" unless fetch(name).is_a? Array
    set(name, fetch(name) + [values].flatten)
  else
    set(name, values)
  end
end

#cset(name, *args, &block) ⇒ Object



1
2
3
# File 'lib/aktion_cap/recipe/base.rb', line 1

def cset(name, *args, &block)
  set(name, *args, &block) unless exists? name
end