class Gravaty::Parsers::Secure
This class is an implementation of the Parsable duck type that provides the secure or unsecure URI. The only needed parameter is a boolean, with true
for secure.
- Author
- Copyright
-
Copyright © 2013, 2014, 2015, 2016, 2017, 2018,
2019 Marco Bresciani
- License
-
GNU General Public License version 3
Public Instance Methods
parse(value = false)
click to toggle source
The parsable duck type interface to every parser usage.
# File lib/gravaty/parsers/secure.rb 34 def parse(value = false) 35 value ? 'https://secure' : 'http://www' 36 end