Method: CKick::Path#initialize

Defined in:
lib/ckick/path.rb

#initialize(args = {}) ⇒ Path

Returns a new instance of Path.



10
11
12
13
14
15
# File 'lib/ckick/path.rb', line 10

def initialize args={}
  raise IllegalInitializationError, "needs :path parameter" unless args.is_a?(Hash) && args[:path].is_a?(String)
  raise NoSuchDirectoryError, "invalid path #{args[:path]}" unless Dir.exist?(args[:path])

  @path = args[:path]
end