Class: Dopstick::Generator::NPM::Options

Inherits:
Options
  • Object
show all
Defined in:
lib/dopstick/generator/npm/options.rb

Instance Method Summary collapse

Methods inherited from Options

#[], #bin?, #github_url, #github_user, #initialize, #merge, #method_missing, #paypal_user, #respond_to_missing?, #skip_install?

Constructor Details

This class inherits a constructor from Dopstick::Generator::Options

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Dopstick::Generator::Options

Instance Method Details

#user_emailObject



14
15
16
17
# File 'lib/dopstick/generator/npm/options.rb', line 14

def user_email
  `npm get init.author.email`.chomp.presence ||
    super
end

#user_nameObject



9
10
11
12
# File 'lib/dopstick/generator/npm/options.rb', line 9

def user_name
  `npm get init.author.name`.chomp.presence ||
    super
end

#user_urlObject



19
20
21
22
# File 'lib/dopstick/generator/npm/options.rb', line 19

def user_url
  `npm get init.author.url`.chomp.presence ||
    "https://github.com/#{github_user}"
end