Class: BuPr::Configuration
- Inherits:
-
Object
- Object
- BuPr::Configuration
- Includes:
- Singleton
- Defined in:
- lib/bu_pr/configuration.rb
Constant Summary collapse
- ACCESSORS =
%i( access_token base_branch pr_title repo_name )
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 |
# File 'lib/bu_pr/configuration.rb', line 15 def initialize @base_branch = "master" @pr_title = "Bundle update #{Time.now.strftime('%F')}" @access_token = ENV["BUPR_TOKEN"] @repo_name = ENV["BUPR_REPO"] end |
Instance Method Details
#valid? ⇒ Boolean
23 24 25 26 27 28 29 |
# File 'lib/bu_pr/configuration.rb', line 23 def valid? ACCESSORS.all? do |accr| val = public_send(accr) val && val != "" end end |