Class: Pronto::Config
- Inherits:
-
Object
- Object
- Pronto::Config
- Defined in:
- lib/pronto/config.rb
Instance Method Summary collapse
- #excluded_files ⇒ Object
- #github_hostname ⇒ Object
-
#initialize(config_hash = ConfigFile.new.to_h) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config_hash = ConfigFile.new.to_h) ⇒ Config
Returns a new instance of Config.
3 4 5 |
# File 'lib/pronto/config.rb', line 3 def initialize(config_hash = ConfigFile.new.to_h) @config_hash = config_hash end |
Instance Method Details
#excluded_files ⇒ Object
14 15 16 17 18 |
# File 'lib/pronto/config.rb', line 14 def excluded_files @excluded_files ||= Array(exclude) .flat_map { |path| Dir[path.to_s] } .map { |path| File.(path) } end |
#github_hostname ⇒ Object
20 21 22 |
# File 'lib/pronto/config.rb', line 20 def github_hostname URI.parse(github_web_endpoint).host end |