Class: NPM2Gem::Config
- Inherits:
-
Object
- Object
- NPM2Gem::Config
- Defined in:
- lib/npm2gem/config.rb
Instance Method Summary collapse
-
#files_to_copy ⇒ Object
This is an array, of either: - file names, or - a hash: { destination_subfolder: files }.
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#package_name ⇒ Object
TODO: support more than one?.
Constructor Details
#initialize ⇒ Config
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_copy ⇒ Object
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_name ⇒ Object
TODO: support more than one?
10 11 12 |
# File 'lib/npm2gem/config.rb', line 10 def package_name @yaml_file.keys.first end |