Module: Jat::Plugins::ToStr
- Defined in:
- lib/jat/plugins/to_str/to_str.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: ToStrJSON
Class Method Summary
collapse
Class Method Details
.after_load(jat_class, **opts) ⇒ Object
15
16
17
|
# File 'lib/jat/plugins/to_str/to_str.rb', line 15
def self.after_load(jat_class, **opts)
jat_class.config[:to_str] = opts[:to_str] || ->(data) { ToStrJSON.dump(data) }
end
|
.load(jat_class, **_opts) ⇒ Object
10
11
12
13
|
# File 'lib/jat/plugins/to_str/to_str.rb', line 10
def self.load(jat_class, **_opts)
jat_class.include(InstanceMethods)
jat_class.extend(ClassMethods)
end
|
.plugin_name ⇒ Object
6
7
8
|
# File 'lib/jat/plugins/to_str/to_str.rb', line 6
def self.plugin_name
:to_str
end
|