Class: PlayTime::Configuration
- Inherits:
-
Object
- Object
- PlayTime::Configuration
- Defined in:
- lib/play_time/configuration.rb
Defined Under Namespace
Classes: MissingOption
Constant Summary collapse
- DEFAULT_CONFIG =
'config/play_time.yml'.freeze
- OPTIONS =
%w( apk_path client_name client_version secret_path secret_passphrase issuer package_name ).freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(config) ⇒ Configuration
Returns a new instance of Configuration.
28 29 30 |
# File 'lib/play_time/configuration.rb', line 28 def initialize(config) @config = config end |
Class Method Details
.create_config(config_dir, config_path) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/play_time/configuration.rb', line 20 def self.create_config(config_dir, config_path) unless File.exist?(config_dir) FileUtils.mkdir_p(config_dir) end FileUtils.cp("#{__dir__}/templates/play_time.yml", config_path) end |
.exists? ⇒ Boolean
16 17 18 |
# File 'lib/play_time/configuration.rb', line 16 def self.exists? File.exist? PlayTime.config_path end |