class Ellipses::Server::MetaFile
Constants
- Error
- FILE
Attributes
directory[R]
Public Class Methods
new(directory)
click to toggle source
# File lib/ellipses/server/meta_file.rb, line 14 def initialize(directory) @directory = Support.dir!(directory, error: Error) @file = Support.file!(FILE, base: @directory, error: Error) end
valid?(directory)
click to toggle source
# File lib/ellipses/server/meta_file.rb, line 30 def valid?(directory) new(directory) true rescue Error false end
Public Instance Methods
read()
click to toggle source
# File lib/ellipses/server/meta_file.rb, line 23 def read Meta.new Tomlrb.load_file(@file) rescue StandardError => e raise Error, "Error while loading meta file: #{file}: #{e.message}" end
to_s()
click to toggle source
# File lib/ellipses/server/meta_file.rb, line 19 def to_s @file end