Module: Roda::RodaPlugins::TypecastParams::ClassMethods

Defined in:
lib/roda/plugins/typecast_params.rb

Instance Method Summary collapse

Instance Method Details

#freezeObject

Freeze the Params subclass when freezing the class.



1115
1116
1117
1118
# File 'lib/roda/plugins/typecast_params.rb', line 1115

def freeze
  self::TypecastParams.freeze
  super
end

#inherited(subclass) ⇒ Object

Assign the application subclass a subclass of the current Params subclass.



1121
1122
1123
1124
# File 'lib/roda/plugins/typecast_params.rb', line 1121

def inherited(subclass)
  super
  subclass.const_set(:TypecastParams, Class.new(self::TypecastParams))
end