Class: Deas::Url
- Inherits:
-
Object
- Object
- Deas::Url
- Defined in:
- lib/deas/url.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(name, path) ⇒ Url
constructor
A new instance of Url.
- #path_for(*args) ⇒ Object
Constructor Details
#initialize(name, path) ⇒ Url
Returns a new instance of Url.
8 9 10 |
# File 'lib/deas/url.rb', line 8 def initialize(name, path) @name, @path = name, path end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/deas/url.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/deas/url.rb', line 6 def path @path end |
Instance Method Details
#path_for(*args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/deas/url.rb', line 12 def path_for(*args) hashed, ordered = [ args.last.kind_of?(::Hash) ? args.pop : {}, args ] apply_ordered(apply_hashed(@path, hashed), ordered) end |