Class: NPM2Gem::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/npm2gem/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
# File 'lib/npm2gem/config.rb', line 5

def initialize
  @yaml_file = YAML.load_file(".npm2gem.yml")
end

Instance Method Details

#files_to_copyObject

This is an array, of either:

- file names, or
- a hash: { destination_subfolder: files }


17
18
19
# File 'lib/npm2gem/config.rb', line 17

def files_to_copy
  @yaml_file[package_name]
end

#package_nameObject

TODO: support more than one?



10
11
12
# File 'lib/npm2gem/config.rb', line 10

def package_name
  @yaml_file.keys.first
end