Module: Roda::RodaPlugins::Json::ClassMethods
- Defined in:
- lib/roda/plugins/json.rb
Instance Attribute Summary collapse
-
#json_result_classes ⇒ Object
readonly
The classes that should be automatically converted to json.
Instance Method Summary collapse
-
#inherited(subclass) ⇒ Object
Copy the json_result_classes into the subclass.
Instance Attribute Details
#json_result_classes ⇒ Object (readonly)
The classes that should be automatically converted to json
46 47 48 |
# File 'lib/roda/plugins/json.rb', line 46 def json_result_classes @json_result_classes end |
Instance Method Details
#inherited(subclass) ⇒ Object
Copy the json_result_classes into the subclass
49 50 51 52 |
# File 'lib/roda/plugins/json.rb', line 49 def inherited(subclass) super subclass.instance_variable_set(:@json_result_classes, json_result_classes.dup) end |