lib/pudl/property_types.rb
# Define a DSL property that accepts multiple values
# and receives them as an array, or a block that
# returns an array when called
Define a DSL property that accepts multiple values
and receives them as an array, or a block that
returns an array when called
Define a DSL property that accepts multiple values and receives them as an array or a block that returns an array when called
def property_multi name, &block
        send :define_method, name do |*args, &b|
          if !args.empty? && b
            raise ArgumentError, "Cannot specify a value and a block in a multi property"
          end
          args = b if args.empty? && b
          instance_exec args, &block
        end
      end
def property_multi name , & block send :define_method , name do | * args , & b | if ! args . empty? && b raise ArgumentError , "Cannot specify a value and a block in a multi property" end args = b if args . empty? && b instance_exec args , & block end end
Define a DSL property that accepts multiple values
and receives them as an array, or a block that
returns an array when called
Define a DSL property that accepts multiple values and receives them as an array or a block that returns an array when called
name
<not_specific>
block
<not_specific>