Module: GnuCash::Options

Extended by:
Options
Included in:
Options
Defined in:
lib/gnucash/options.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/gnucash/options.rb', line 6

def [] key
  data = dataset.where(:name => "options/#{key}").first

  return "[Unkown option #{key}" unless data

  case data[:slot_type]
  when 4 then data[:string_val]
  else "[Unknown data type for #{key}]"
  end
end