class CKick::Path
Represents a file system path, it must exist
Attributes
path[R]
Public Class Methods
new(args={})
click to toggle source
initializes path, path must exist
# File lib/ckick/path.rb, line 13 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
Public Instance Methods
to_hash_element()
click to toggle source
converts to hash-serializable element
# File lib/ckick/path.rb, line 26 def to_hash_element @path end
to_s()
click to toggle source
returns path as is
# File lib/ckick/path.rb, line 21 def to_s @path end