Sha256: 1eb9436868c832ba0eb87d13cbe9939d8b73d7b0e0528853220c739562a7a628
Contents?: true
Size: 661 Bytes
Versions: 2
Compression:
Stored size: 661 Bytes
Contents
module Copypasta class ParameterDefinition attr_reader :name attr_reader :description attr_reader :default attr_reader :postprocess def initialize(name, description, default, postprocess) raise "name must be nil or a Symbol." \ unless name.is_a?(Symbol) || name.nil? @name = name raise "description must be nil or a String." \ unless description.is_a?(String) || description.nil? @description = description @default = default raise "postprocess must be nil or a String." \ unless postprocess.is_a?(Proc) || postprocess.nil? @postprocess = postprocess end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
copypasta-0.1.1 | lib/copypasta/parameter_definition.rb |
copypasta-0.1.0 | lib/copypasta/parameter_definition.rb |