Class: Libv8::Node::Location

Inherits:
Object
  • Object
show all
Defined in:
ext/libv8-node/location.rb

Direct Known Subclasses

Vendor

Defined Under Namespace

Classes: MkmfContext, Vendor

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.load!Object



19
20
21
22
23
# File 'ext/libv8-node/location.rb', line 19

def self.load!
  File.open(Pathname(__FILE__).dirname.join('.location.yml')) do |f|
    YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(f) : YAML.load(f) # rubocop:disable Security/YAMLLoad
  end
end

Instance Method Details

#install!Object



11
12
13
14
15
16
17
# File 'ext/libv8-node/location.rb', line 11

def install!
  File.open(Pathname(__FILE__).dirname.join('.location.yml'), 'w') do |f|
    f.write(to_yaml)
  end

  0
end