Class: Hyperlayer::Path

Inherits:
ApplicationRecord show all
Defined in:
app/models/hyperlayer/path.rb

Instance Method Summary collapse

Instance Method Details

#editedObject



21
22
23
# File 'app/models/hyperlayer/path.rb', line 21

def edited
  Ast.call(id)
end

#overlayObject



13
14
15
# File 'app/models/hyperlayer/path.rb', line 13

def overlay
  BuildFileOverlay.call(path: self)
end

#overlay_codeObject



25
26
27
28
29
30
31
32
33
# File 'app/models/hyperlayer/path.rb', line 25

def overlay_code
  @code = ''
  
  events.where(event_type: 'return').each do |event|
    @code = UpdateCode.call(id, @code, event.method)
  end
  
  @code
end

#set_specObject



7
8
9
10
11
# File 'app/models/hyperlayer/path.rb', line 7

def set_spec
  return unless path.include?('spec')
  
  self.spec = true
end

#test_oneObject



17
18
19
# File 'app/models/hyperlayer/path.rb', line 17

def test_one
  TestOne.call(path: self)
end