Class: Gem::Release::Context::Paths::Base
- Inherits:
-
Struct
- Object
- Struct
- Gem::Release::Context::Paths::Base
- Defined in:
- lib/gem/release/context/paths.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#names ⇒ Object
Returns the value of attribute names.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Instance Attribute Details
#names ⇒ Object
Returns the value of attribute names
7 8 9 |
# File 'lib/gem/release/context/paths.rb', line 7 def names @names end |
#opts ⇒ Object
Returns the value of attribute opts
7 8 9 |
# File 'lib/gem/release/context/paths.rb', line 7 def opts @opts end |
Instance Method Details
#current ⇒ Object
12 13 14 |
# File 'lib/gem/release/context/paths.rb', line 12 def current [[cwd, cwd.basename.to_s]] end |
#cwd ⇒ Object
16 17 18 |
# File 'lib/gem/release/context/paths.rb', line 16 def cwd @cwd ||= Pathname.pwd end |
#in_dir(dir, &block) ⇒ Object
8 9 10 |
# File 'lib/gem/release/context/paths.rb', line 8 def in_dir(dir, &block) dir == cwd ? yield : Dir.chdir(dir, &block) end |