Class: Gitenv::Config
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#home ⇒ Object
readonly
Returns the value of attribute home.
-
#repository ⇒ Object
Returns the value of attribute repository.
Attributes included from Context
#absolute, #from_paths, #to_paths
Instance Method Summary collapse
- #all_files ⇒ Object
- #copy(file, options = {}) ⇒ Object
- #dot_files ⇒ Object
-
#initialize(home) ⇒ Config
constructor
A new instance of Config.
- #repo(path) ⇒ Object
- #symlink(file, options = {}) ⇒ Object
Methods included from Context
#copy!, #from, #from_path, #to, #to_abs, #to_path
Constructor Details
#initialize(home) ⇒ Config
Returns a new instance of Config.
11 12 13 14 |
# File 'lib/gitenv/config.rb', line 11 def initialize home @home = home @actions = [] end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
7 8 9 |
# File 'lib/gitenv/config.rb', line 7 def actions @actions end |
#home ⇒ Object (readonly)
Returns the value of attribute home.
9 10 11 |
# File 'lib/gitenv/config.rb', line 9 def home @home end |
#repository ⇒ Object
Returns the value of attribute repository.
8 9 10 |
# File 'lib/gitenv/config.rb', line 8 def repository @repository end |
Instance Method Details
#all_files ⇒ Object
28 29 30 |
# File 'lib/gitenv/config.rb', line 28 def all_files :all_files end |
#copy(file, options = {}) ⇒ Object
24 25 26 |
# File 'lib/gitenv/config.rb', line 24 def copy file, = {} Action.new(self, Copy, enumerator(file), ).tap{ |a| @actions << a } end |
#dot_files ⇒ Object
32 33 34 |
# File 'lib/gitenv/config.rb', line 32 def dot_files :dot_files end |
#repo(path) ⇒ Object
16 17 18 |
# File 'lib/gitenv/config.rb', line 16 def repo path @repository = File. path end |