Sha256: 30e42e992d7abe82341cfea038fd9179ac1fed9788264d85d436dd13541714d9
Contents?: true
Size: 339 Bytes
Versions: 1
Compression:
Stored size: 339 Bytes
Contents
module SimpleFactory class Definition attr_reader :name def initialize(name, value_or_callable) @name = name @value_or_callable = value_or_callable end def value if @value_or_callable.respond_to?(:call) @value_or_callable.call else @value_or_callable end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_factory-0.1.0 | lib/simple_factory/definition.rb |