Sha256: 6644406da5a365658ee1535d0200e9200efcdbe01e621162f29e100084388895
Contents?: true
Size: 659 Bytes
Versions: 14
Compression:
Stored size: 659 Bytes
Contents
module Kaya module Custom class Params # This class is used to provide to user in his code access to the custom params sent # from Kaya def initialize params = ENV || {} @custom_params = if params["kaya_custom_params"] JSON.parse(params["kaya_custom_params"]) else params end end def self.get self.new end def all_params @custom_params end def raw; all_params; end # All custom params can be called as methods def method_missing(param, *args, &block) @custom_params[param.to_s] end end end end
Version data entries
14 entries across 14 versions & 1 rubygems