Module: Cheeba

Defined in:
lib/cheeba.rb,
lib/cheeba/errors.rb,
lib/cheeba/writer.rb,
lib/cheeba/version.rb,
lib/cheeba/defaults.rb,
lib/cheeba/indicators.rb,
lib/cheeba/reader/node.rb

Defined Under Namespace

Modules: Defaults, Errors, Indicators, Reader, Writer

Constant Summary collapse

DOTFILE =
"#{ENV['HOME']}/.cheeba"
VERSION =
'1.0.4'

Class Method Summary collapse

Class Method Details

.dotfile(home = ENV['HOME']) ⇒ Object

writes a .cheeba file HOME, merges with options if :dot is true



33
34
35
# File 'lib/cheeba.rb', line 33

def self.dotfile(home = ENV['HOME'])
  Cheeba::Writer.dotfile(Cheeba::Defaults.options, home)
end

.parse(object, options = {}) ⇒ Object

Hash or Array to .cash Array



19
20
21
# File 'lib/cheeba.rb', line 19

def self.parse(object, options = {})
  Cheeba::Writer.build(object, self.options(options))
end

.read(input, options = {}) ⇒ Object

File to Hash or Array



12
13
14
# File 'lib/cheeba.rb', line 12

def self.read(input, options = {})
  Cheeba::Reader.read(input, self.options(options))
end

.write(object, filename, options = {}) ⇒ Object

Hash or Array to .cash-file, e.g. filename.cash



26
27
28
# File 'lib/cheeba.rb', line 26

def self.write(object, filename, options = {})
  Cheeba::Writer.write(object, filename, self.options(options))
end