lib/rubysmith/pathway.rb in rubysmith-0.9.1 vs lib/rubysmith/pathway.rb in rubysmith-0.10.0
- old
+ new
@@ -12,20 +12,14 @@
each_pair { |key, value| self[key] = Pathname value }
self[:start_path] = start_path.absolute? ? start_path : start_root.join(start_path)
freeze
end
- def with attributes
- self.class.new to_h.merge(attributes)
- end
+ def with(attributes) = self.class.new(to_h.merge(attributes))
- def end_path
- end_root.join from_parent, start_path.basename
- end
+ def end_path = end_root.join(from_parent, start_path.basename)
- def partial?
- start_path.basename.fnmatch? "_*"
- end
+ def partial? = start_path.basename.fnmatch?("_*")
private
def from_parent
return end_root.join start_path.parent if start_path.relative?