Class: Gitenv::Config
- Inherits:
-
Object
- Object
- Gitenv::Config
- Defined in:
- lib/gitenv/config.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#repos ⇒ Object
readonly
Returns the value of attribute repos.
Instance Method Summary collapse
- #all_files(options = {}) ⇒ Object
- #copy(file, options = {}) ⇒ Object
- #dot_files(options = {}) ⇒ Object
- #ignores ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #repo(path, &block) ⇒ Object
- #symlink(file, options = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
8 9 10 |
# File 'lib/gitenv/config.rb', line 8 def actions @actions end |
#repos ⇒ Object (readonly)
Returns the value of attribute repos.
7 8 9 |
# File 'lib/gitenv/config.rb', line 7 def repos @repos end |
Instance Method Details
#all_files(options = {}) ⇒ Object
31 32 33 |
# File 'lib/gitenv/config.rb', line 31 def all_files = {} matcher :all_files, end |
#copy(file, options = {}) ⇒ Object
26 27 28 29 |
# File 'lib/gitenv/config.rb', line 26 def copy file, = {} raise "You must specify a repository or a source directory to copy from" unless @context.from Copy::Action.new(@context.dup, matcher(file), ).tap{ |a| @actions << a } end |
#dot_files(options = {}) ⇒ Object
35 36 37 |
# File 'lib/gitenv/config.rb', line 35 def dot_files = {} matcher :dot_files, end |
#ignores ⇒ Object
46 47 48 |
# File 'lib/gitenv/config.rb', line 46 def ignores @context.ignores end |
#repo(path, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/gitenv/config.rb', line 15 def repo path, &block @repos << Repository.new(path) @context.from path, &block self end |