Module: Mercy

Extended by:
ActiveSupport::Concern
Defined in:
lib/mercy.rb,
lib/mercy/report.rb,
lib/mercy/status.rb,
lib/mercy/concern.rb,
lib/mercy/version.rb,
lib/mercy/report/error.rb,
lib/mercy/report/range.rb,
lib/mercy/class_methods.rb,
lib/mercy/period_parser.rb,
lib/mercy/report_config.rb,
lib/mercy/report_builder.rb,
lib/mercy/status_builder.rb,
lib/mercy/report/active_record.rb

Defined Under Namespace

Modules: ClassMethods Classes: PeriodParser, Report, ReportBuilder, ReportConfig, Status, StatusBuilder

Constant Summary collapse

VERSION =
'1.6.0'

Instance Method Summary collapse

Instance Method Details

#render_status(key = :default) ⇒ Object



4
5
6
7
# File 'lib/mercy/concern.rb', line 4

def render_status(key = :default)
  status = self.class.status_builder.build(key, params)
  render json: status.as_json.stringify_keys.to_deep_hash, status: status.status
end