Class: Gravaty::Parsers::Secure

Inherits:
Object
  • Object
show all
Defined in:
lib/gravaty/parsers/secure.rb

Overview

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

Marco Bresciani

rubocop:disable Style/AsciiComments

Copyright

Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani

rubocop:enable Style/AsciiComments

License

GNU General Public License version 3

Instance Method Summary collapse

Instance Method Details

#parse(value = false) ⇒ Object

The parsable duck type interface to every parser usage.



42
43
44
# File 'lib/gravaty/parsers/secure.rb', line 42

def parse(value = false)
  value ? 'https://secure' : 'http://www'
end