Module: Rapidash::Urlable::ClassMethods

Defined in:
lib/rapidash/urlable.rb

Instance Method Summary collapse

Instance Method Details

#url(url) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rapidash/urlable.rb', line 8

def url(url)
  define_method(:initialize) do |*args|
    super(*args)
    @url = "#{base_url}#{url.to_s}"
    @url += "/#{@id}" if @id
  end
end