Class: Viperaptor::RambafileValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/viperaptor/helpers/rambafile.rb

Overview

Provides methods for validating Rambafile contents

Instance Method Summary collapse

Instance Method Details

#validate(path) ⇒ Void

Method validates Rambafile contents

Parameters:

  • path (String)

    The path to a Rambafile

Returns:

  • (Void)


11
12
13
14
# File 'lib/viperaptor/helpers/rambafile.rb', line 11

def validate(path)
  file_contents = open(path).read
  preferences = file_contents.empty? ? {} : YAML.load(file_contents).to_hash
end