Class: Boutons::URI
- Inherits:
-
Object
show all
- Defined in:
- lib/boutons/uri.rb
Defined Under Namespace
Classes: Registry
Instance Method Summary
collapse
Constructor Details
#initialize(uri) ⇒ URI
72
73
74
75
|
# File 'lib/boutons/uri.rb', line 72
def initialize uri
uri = ::URI.escape uri
@uri ||= URI(uri)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
91
92
93
|
# File 'lib/boutons/uri.rb', line 91
def method_missing method, *args, &block
@uri.send method, *args, &block
end
|
Instance Method Details
#check_uri ⇒ Object
87
88
89
|
# File 'lib/boutons/uri.rb', line 87
def check_uri
::URI.unescape(@uri.path).split("#",2)[1] || "/"
end
|
#mode ⇒ Object
79
80
|
# File 'lib/boutons/uri.rb', line 79
def mode
end
|
#registry ⇒ Object
76
77
78
|
# File 'lib/boutons/uri.rb', line 76
def registry
@registry ||= Registry.new @uri
end
|
#type ⇒ Object
81
82
83
|
# File 'lib/boutons/uri.rb', line 81
def type
@uri.scheme
end
|