Class: String
Instance Method Summary collapse
-
#decode_uri ⇒ String
Decode as URI.
-
#decode_uri_component ⇒ String
Decode as URI component.
-
#encode_uri ⇒ String
Encode as URI.
-
#encode_uri_component ⇒ String
Encode as URI component.
- #to_u ⇒ Object
Instance Method Details
#decode_uri ⇒ String
Decode as URI.
47 48 49 |
# File 'opal/browser/utils.rb', line 47 def decode_uri `decodeURI(self)` end |
#decode_uri_component ⇒ String
Decode as URI component.
40 41 42 |
# File 'opal/browser/utils.rb', line 40 def decode_uri_component `decodeURIComponent(self)` end |
#encode_uri ⇒ String
Encode as URI.
33 34 35 |
# File 'opal/browser/utils.rb', line 33 def encode_uri `encodeURI(self)` end |
#encode_uri_component ⇒ String
Encode as URI component.
26 27 28 |
# File 'opal/browser/utils.rb', line 26 def encode_uri_component `encodeURIComponent(self)` end |
#to_u ⇒ Object
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 |