Sha256: 0c2e570c373442e4ff8c55539ea47c84571cbf5158d59daf61f8fa03c6617273
Contents?: true
Size: 917 Bytes
Versions: 84
Compression:
Stored size: 917 Bytes
Contents
module Eco module API class Session class Config class Files < BaseConfig def initialize(config:) super(config: config) @validations = {} end def working_directory=(path) self["dir"] = path end def working_directory self["dir"] end def timestamp_pattern=(pattern) self["timestamp_pattern"] = pattern end def timestamp_pattern self["timestamp_pattern"] end def add_validation(format) raise "Block must be given" unless block_given? @validations[format] = Proc.new end def validate(format, input) @validations[format].call(input) if @validations.key?(format) end end end end end end
Version data entries
84 entries across 84 versions & 1 rubygems