lib/pudl/property_types.rb
# Define a DSL property that accepts two arguments,
# a key and a value
Define a DSL property that accepts two arguments,
a key and a value
Define a DSL property that accepts two arguments a key and a value
def property_keyval_static name, &block
        send :define_method, name do |k, v=nil, &b|
          if !b.nil?
            raise ArgumentError, "property_keyval_static properties do not support blocks"
          end
          if !k.is_a? Symbol
            raise ArgumentError, "Key must be a symbol in a keyval_static property"
          end
          instance_exec k, v, &block
        end
      end
def property_keyval_static name , & block send :define_method , name do | k , v = nil , & b | if ! b . nil? raise ArgumentError , "property_keyval_static properties do not support blocks" end if ! k . is_a? Symbol raise ArgumentError , "Key must be a symbol in a keyval_static property" end instance_exec k , v , & block end end
Define a DSL property that accepts two arguments,
a key and a value
Define a DSL property that accepts two arguments a key and a value
name
<not_specific>
block
<not_specific>