vuderacha-orq 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/orq/impulse.rb +5 -0
- metadata +1 -1
data/lib/orq/impulse.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'rubygems'
|
|
2
2
|
require 'yaml'
|
|
3
|
+
require 'json' rescue nil # This prevents the json gem loading afterwards and messing up the JSON serialisation
|
|
3
4
|
require 'active_support'
|
|
4
5
|
|
|
5
6
|
module ORQ
|
|
@@ -21,6 +22,10 @@ module ORQ
|
|
|
21
22
|
end
|
|
22
23
|
end
|
|
23
24
|
|
|
25
|
+
def to_json(options = {})
|
|
26
|
+
ActiveSupport::JSON.encode(instance_values, options)
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
# Class Methods
|
|
25
30
|
class << self
|
|
26
31
|
#
|