class Ryquest::Configuration
Hold / handle writable configuration variables @attr content_type
[Symbol] Must be :form or :json.
Define in which format response! send data. Accepted value: * :form (default) - x-www-form-urlencoded * :json - JSON (only affect post, put, patch)) Note that the value will affect CONTENT-TYPE header
Attributes
content_type[R]
Public Class Methods
new()
click to toggle source
Define default configuration value
# File lib/ryquest/configuration.rb, line 20 def initialize @content_type = :form end
Public Instance Methods
content_type=(value)
click to toggle source
# File lib/ryquest/configuration.rb, line 13 def content_type= value raise ArgumentError, 'content_type configuration value must be form or json' if %i[form json].exclude? value @content_type = value end