lib/mortar/project.rb in mortar-0.15.6 vs lib/mortar/project.rb in mortar-0.15.7

- old
+ new

@@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # require 'fileutils' +require 'pathname' module Mortar module Project class ProjectError < RuntimeError; end @@ -191,9 +192,14 @@ def code script_file = File.open(@path, "r") script_contents = script_file.read script_file.close script_contents + end + + def rel_path + p = Pathname.new(@path).dirname + rel_path = p.relative_path_from(Pathname.pwd).to_s end def to_s code end