Module: Moon::DataSerializer

Defined in:
lib/moon/packages/dataman/data_serializer.rb

Defined Under Namespace

Classes: Resolver

Class Method Summary collapse

Class Method Details

.load(data, depth = 0) ⇒ Object


57
58
59
# File 'lib/moon/packages/dataman/data_serializer.rb', line 57

def self.load(data, depth = 0)
  load_obj Resolver.resolve(data, depth + 1)
end

.load_file(filename, depth = 0) ⇒ Object


61
62
63
64
# File 'lib/moon/packages/dataman/data_serializer.rb', line 61

def self.load_file(filename, depth = 0)
  data = DataLoader.raw_file(filename)
  load DataLoader.string(data), depth + 1
end