Skip to content

Commit ca0bef2

Browse files
committed
more reduction
1 parent ec2f357 commit ca0bef2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/manifolds/project/project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module API
66
class Project
77
attr_reader :name, :directory
88

9-
def initialize(name, directory: Pathname(File.join(Dir.pwd, name)))
9+
def initialize(name, directory: Pathname.pwd.join(name))
1010
self.name = name
1111
self.directory = directory
1212
end

lib/manifolds/project/vector.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def add
2222
end
2323

2424
def tables_directory
25-
Pathname(File.join(project.vectors_directory, "tables"))
25+
project.vectors_directory.join("tables")
2626
end
2727

2828
def routines_directory
29-
Pathname(File.join(project.vectors_directory, "routines"))
29+
project.vectors_directory.join("routines")
3030
end
3131

3232
private

spec/manifolds/api/project_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
context "with directory" do
2828
subject(:project) { described_class.new(name, directory: directory) }
2929

30-
let(:directory) { Pathname(File.join(Dir.pwd, "supplied_directory")) }
30+
let(:directory) { Pathname.pwd.join("supplied_directory") }
3131

3232
it { is_expected.to have_attributes(directory: directory) }
3333
end

0 commit comments

Comments
 (0)