Class: String
- Defined in:
- opal/browser/utils.rb,
opal/browser/css/unit.rb more...
Instance Method Summary collapse
-
#decode_uri ⇒ String
deprecated
Deprecated.
Please use FormData.decode_uri
-
#decode_uri_component ⇒ String
deprecated
Deprecated.
Please use FormData.decode
-
#encode_uri ⇒ String
deprecated
Deprecated.
Please use FormData.encode_uri
-
#encode_uri_component ⇒ String
deprecated
Deprecated.
Please use FormData.encode
- #to_u ⇒ Object
Instance Method Details
permalink #decode_uri ⇒ String
Deprecated.
Please use FormData.decode_uri
Decode as URI.
129 130 131 132 |
# File 'opal/browser/utils.rb', line 129 def decode_uri warn "opal-browser: String#decode_uri is deprecated. Please use FormData.decode_uri" FormData.decode_uri(self) end |
permalink #decode_uri_component ⇒ String
Deprecated.
Please use FormData.decode
Decode as URI component.
120 121 122 123 |
# File 'opal/browser/utils.rb', line 120 def decode_uri_component warn "opal-browser: String#decode_uri_component is deprecated. Please use FormData.decode" FormData.decode(self) end |
permalink #encode_uri ⇒ String
Deprecated.
Please use FormData.encode_uri
Encode as URI.
111 112 113 114 |
# File 'opal/browser/utils.rb', line 111 def encode_uri warn "opal-browser: String#encode_uri is deprecated. Please use FormData.encode_uri" FormData.encode_uri(self) end |
permalink #encode_uri_component ⇒ String
Deprecated.
Please use FormData.encode
Encode as URI component.
102 103 104 105 |
# File 'opal/browser/utils.rb', line 102 def encode_uri_component warn "opal-browser: String#encode_uri_component is deprecated. Please use FormData.encode" FormData.encode(self) end |
permalink #to_u ⇒ Object
[View source]
169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'opal/browser/css/unit.rb', line 169 def to_u if matches = self.match(/^([\d+.]+)(.+)?$/) value = matches[1].to_f if unit = matches[2] value.__send__(unit.downcase) else value end else 0 end end |