Module: Bixby::Jsonify

Includes:
Hashify
Included in:
CommandResponse, CommandSpec, JsonRequest, JsonResponse
Defined in:
lib/bixby-common/util/jsonify.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hashify

#to_hash

Class Method Details

.included(receiver) ⇒ Object



22
23
24
# File 'lib/bixby-common/util/jsonify.rb', line 22

def self.included(receiver)
  receiver.extend(ClassMethods)
end

Instance Method Details

#to_json(*opts) ⇒ Object



9
10
11
# File 'lib/bixby-common/util/jsonify.rb', line 9

def to_json(*opts)
  MultiJson.dump(self.to_hash)
end