Module: Imglab
- Defined in:
- lib/imglab.rb,
lib/imglab/version.rb
Defined Under Namespace
Modules: Color, Position Classes: Signature, Source, Utils
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.url(source_name_or_source, path, params = {}) ⇒ String
Returns a formatted URL ‘string` with the specified arguments.
Class Method Details
.url(source_name_or_source, path, params = {}) ⇒ String
Returns a formatted URL ‘string` with the specified arguments.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/imglab.rb', line 23 def self.url(source_name_or_source, path, params = {}) case source_name_or_source when String url_for_source(Source.new(source_name_or_source), path, params) when Source url_for_source(source_name_or_source, path, params) else raise ArgumentError.new("Invalid source name or source. A string or #{Imglab::Source.name} is expected.") end end |