Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ryanb/ruby-warrior
base: 94dc735410
...
head fork: ryanb/ruby-warrior
compare: fdc79340a9
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 17, 2011
@pejuko pejuko create load_path dynamicaly 7992ca2
Commits on Apr 28, 2012
@ryanb Merge pull request #32 from pejuko/path
dynamicaly create load_path
fdc7934
View
6 lib/ruby_warrior/level.rb
@@ -24,7 +24,11 @@ def player_path
end
def load_path
- @profile.tower_path + "/level_" + @number.to_s.rjust(3, '0') + ".rb"
+ File.join(
+ File.expand_path(File.dirname(__FILE__) + '/../../towers/'),
+ File.basename(@profile.tower_path) + "/level_" +
+ @number.to_s.rjust(3, '0') + ".rb"
+ )
end
def load_level
View
2  lib/ruby_warrior/profile.rb
@@ -62,7 +62,7 @@ def epic_score_with_grade
end
def tower
- Tower.new(@tower_path)
+ Tower.new(File.basename @tower_path)
end
def current_level
View
2  lib/ruby_warrior/tower.rb
@@ -3,7 +3,7 @@ class Tower
attr_reader :path
def initialize(path)
- @path = path
+ @path = File.join(File.expand_path(File.dirname(__FILE__) + '/../../towers/'), path)
end
def name

No commit comments for this range

Something went wrong with that request. Please try again.