class Gravaty::Parsers::Force

This class is an implementation of the Parsable duck type that checks forces the default value. The only needed parameter is a boolean, with true for forced.

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

Public Instance Methods

parse(value = false) click to toggle source

The parsable duck type interface to every parser usage.

   # File lib/gravaty/parsers/force.rb
42 def parse(value = false)
43   return 'f=y' if value
44 
45   ''
46 end