Module: Cheeba::Defaults

Defined in:
lib/cheeba/defaults.rb

Constant Summary collapse

INT =
true
INT_KEYS =
false
INT_VALS =
false
SYMBOLIZE =
false
SYMBOLIZE_KEYS =
false
SYMBOLIZE_VALS =
false
SYM_STR =
false
SYM_STR_KEYS =
false
SYM_STR_VALS =
false
AUTO_SYM =
true
AUTO_SYM_KEYS =
false
AUTO_SYM_VALS =
false
AUTO_TRUE =
true
AUTO_TRUE_KEYS =
false
AUTO_TRUE_VALS =
false
STRIP =
true
STRIP_KEYS =
false
STRIP_VALS =
false
LIST =
false
DOT =
true
DOTFILE =
"#{ENV['HOME']}/.cheeba"
YAML =
false
DOCS =
false

Class Method Summary collapse

Class Method Details

.descriptionsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/cheeba/defaults.rb', line 27

def self.descriptions
  { "auto_sym"       => "conv keys & vals: \":both\" => :both",
    "auto_sym_keys"  => "conv keys: \":key\" => :key",
    "auto_sym_vals"  => "conv vals: \":val\" => :val",
    "auto_true"      => "conv keys & vals: \"true\" => true",
    "auto_true_keys" => "conv keys: \"true\" => true",
    "auto_true_vals" => "conv vals: \"true\" => true",
    "docs"           => "doc separator first level hash nodes",
    "dot"            => "use dotfile if it exists",
    "int"            => "conv keys & vals: \"1\" => 1",
    "int_keys"       => "conv keys: \"1\" => 1",
    "int_vals"       => "conv vals: \"1\" => 1",
    "list"           => "return hash of addresses & comments",
    "strip"          => "strip keys & vals: \" both \" => \"both\"",
    "strip_keys"     => "strip keys: \" key \" => \"key\"",
    "strip_vals"     => "strip vals: \" val \" => \"val\"",
    "sym_str"        => "conv str (no int) k & v: \"b\" => :b",
    "sym_str_keys"   => "conv string keys(no int): \"key\" => :key",
    "sym_str_vals"   => "conv string vals(no int): \"val\" => :val",
    "symbolize"      => "force conv keys & vals: \"both\" => :both",
    "symbolize_keys" => "force conv keys: \"key\" => :key",
    "symbolize_vals" => "force conv vals: \"val\" => :val",
    "yaml"           => "write files with YAML type array syntax"}
end

.optionsObject



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/cheeba/defaults.rb', line 52

def self.options
  { :int            => INT,
    :int_keys       => INT_KEYS,
    :int_vals       => INT_VALS,
    :symbolize      => SYMBOLIZE, 
    :symbolize_keys => SYMBOLIZE_KEYS, 
    :symbolize_vals => SYMBOLIZE_VALS, 
    :sym_str        => SYM_STR,
    :sym_str_keys   => SYM_STR_KEYS,
    :sym_str_vals   => SYM_STR_VALS, 
    :auto_sym       => AUTO_SYM,
    :auto_sym_keys  => AUTO_SYM_KEYS,
    :auto_sym_vals  => AUTO_SYM_VALS,
    :auto_true      => AUTO_TRUE,
    :auto_true_keys => AUTO_TRUE_KEYS,
    :auto_true_vals => AUTO_TRUE_VALS,
    :strip          => STRIP,
    :strip_keys     => STRIP_KEYS,
    :strip_vals     => STRIP_VALS,
    :list           => LIST,
    :dot            => DOT,
    :dotfile        => DOTFILE,
    :yaml           => YAML,
    :docs           => DOCS}
end