Class: GistUpdater::Config
- Inherits:
-
Object
- Object
- GistUpdater::Config
- Defined in:
- lib/gist_updater/config.rb
Overview
User configuration
Instance Method Summary collapse
-
#each {|gist_id:, file_paths:| ... } ⇒ Enumerator
Calls block once for each element in config.
-
#initialize(file) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(file) ⇒ Config
Returns a new instance of Config.
9 10 11 |
# File 'lib/gist_updater/config.rb', line 9 def initialize(file) @file = file end |
Instance Method Details
#each {|gist_id:, file_paths:| ... } ⇒ Enumerator
Calls block once for each element in config
20 21 22 23 24 25 26 |
# File 'lib/gist_updater/config.rb', line 20 def each return enum_for(:each) unless block_given? config.each do |c| yield(gist_id: c.first, file_paths: c.drop(1)) end end |