Module: FSLayer

Defined in:
lib/fs_layer.rb,
lib/fs_layer/api.rb,
lib/fs_layer/file.rb,
lib/fs_layer/link.rb,
lib/fs_layer/index.rb,
lib/fs_layer/version.rb

Defined Under Namespace

Classes: File, Index, Link

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.fake?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/fs_layer/api.rb', line 12

def fake?
  @fake
end

.fake_itObject



4
5
6
# File 'lib/fs_layer/api.rb', line 4

def fake_it
  @fake = true
end

.has?(file_object) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/fs_layer/api.rb', line 20

def has? file_object
  Index.known_files.include? file_object 
end

.insert(file) ⇒ Object



16
17
18
# File 'lib/fs_layer/api.rb', line 16

def insert file
  FSLayer::File.add file
end

.keep_it_realObject



8
9
10
# File 'lib/fs_layer/api.rb', line 8

def keep_it_real
  @fake = false
end


24
25
26
# File 'lib/fs_layer/api.rb', line 24

def link file
  FSLayer::Link.new(FSLayer::File.add(file))
end