class Zakuro::Result::Core

Core 共通処理

Public Class Methods

new(*_args) click to toggle source

初期化

# File lib/zakuro/result/core.rb, line 20
def initialize(*_args); end

Public Instance Methods

to_h() click to toggle source

ハッシュ化する

@return [Hash<String, Object>] ハッシュ

# File lib/zakuro/result/core.rb, line 27
def to_h
  Tools::Stringifier.to_h(obj: self, class_prefix: 'Zakuro::Result')
end
to_json(*_args) click to toggle source

JSON化する

@param [JSON::State] _args 引数( Struct#to_json )

@return [String] JSON文字列

# File lib/zakuro/result/core.rb, line 38
def to_json(*_args)
  JSON.generate(to_h)
end
to_pretty_json() click to toggle source

JSON(整形)化する

@return [String] JSON(整形)文字列

# File lib/zakuro/result/core.rb, line 47
def to_pretty_json
  JSON.pretty_generate(to_h)
end