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.
6 7 8 |
# File 'lib/deas/url.rb', line 6 def initialize(name, path) @name, @path = name, path end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/deas/url.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/deas/url.rb', line 4 def path @path end |
Instance Method Details
#path_for(*args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/deas/url.rb', line 10 def path_for(*args) named, ordered = [ args.last.kind_of?(::Hash) ? args.pop : {}, args ] apply_ordered_params(apply_named_params(@path, named), ordered) end |