page_navigation 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/lib/page_navigation/routes.rb +4 -1
- data/lib/page_navigation/version.rb +1 -1
- data/lib/page_navigation.rb +5 -4
- metadata +3 -3
data/ChangeLog
CHANGED
data/lib/page_navigation.rb
CHANGED
@@ -25,8 +25,12 @@ module PageNavigation
|
|
25
25
|
|
26
26
|
def self.included(cls)
|
27
27
|
cls.extend PageNavigation::Routes
|
28
|
+
@cls = cls
|
28
29
|
end
|
29
30
|
|
31
|
+
def self.cls
|
32
|
+
@cls
|
33
|
+
end
|
30
34
|
|
31
35
|
#
|
32
36
|
# Navigate to a specific page following a predefined path.
|
@@ -79,7 +83,7 @@ module PageNavigation
|
|
79
83
|
private
|
80
84
|
|
81
85
|
def path_for(how)
|
82
|
-
path =
|
86
|
+
path = PageNavigation.cls.routes[how[:using]]
|
83
87
|
fail("PageFactory route :#{how[:using].to_s} not found") unless path
|
84
88
|
path
|
85
89
|
end
|
@@ -97,7 +101,4 @@ module PageNavigation
|
|
97
101
|
path.find_index { |each| each[0] == item}
|
98
102
|
end
|
99
103
|
|
100
|
-
def self.included(cls)
|
101
|
-
cls.extend PageNavigation::Routes
|
102
|
-
end
|
103
104
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: page_navigation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
segments:
|
65
65
|
- 0
|
66
|
-
hash:
|
66
|
+
hash: 1381246942640339342
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
none: false
|
69
69
|
requirements:
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
segments:
|
74
74
|
- 0
|
75
|
-
hash:
|
75
|
+
hash: 1381246942640339342
|
76
76
|
requirements: []
|
77
77
|
rubyforge_project: page_naigation
|
78
78
|
rubygems_version: 1.8.24
|