class ApexCharts::Options::DrySchema::Schema
Public Class Methods
check(hash)
click to toggle source
# File lib/apex_charts/options/dry_schema/schema.rb, line 9 def check(hash) return hash if production? schema = new[hash] if schema.failure? raise schema.errors.to_h.inspect else hash end end
keys()
click to toggle source
# File lib/apex_charts/options/dry_schema/schema.rb, line 20 def keys definition.send(:key_map).map{|key| key.name.to_sym } end
Private Class Methods
production?()
click to toggle source
# File lib/apex_charts/options/dry_schema/schema.rb, line 26 def production? (ENV['APP_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV']) == "production" end