Class: Deas::Url

Inherits:
Object
  • Object
show all
Defined in:
lib/deas/url.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/deas/url.rb', line 6

def name
  @name
end

#pathObject (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