Sha256: b069bc9c9db4759c79d391e69e4290bab304d67140c2ebbc20c6887356396428

Contents?: true

Size: 278 Bytes

Versions: 11

Compression:

Stored size: 278 Bytes

Contents

STRING_OR_SYM = Transform(/^:?[A-Za-z]\w*$/) do |str|
  case str
  when /^:/
    str.slice(1, str.length - 1).to_sym
  else
    str
  end
end

NUMBER = Transform(/^(?:\d+|a|an|no)$/) do |num|
  case num
  when 'no'
    0
  when 'a', 'an'
    1
  else
    Integer(num)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
message-driver-1.0.1 features/support/transforms.rb
message-driver-1.0.0 features/support/transforms.rb
message-driver-0.7.2 features/support/transforms.rb
message-driver-0.7.1 features/support/transforms.rb
message-driver-0.7.0 features/support/transforms.rb
message-driver-0.6.1 features/support/transforms.rb
message-driver-0.6.0 features/support/transforms.rb
message-driver-0.5.3 features/support/transforms.rb
message-driver-0.5.2 features/support/transforms.rb
message-driver-0.5.1 features/support/transforms.rb
message-driver-0.5.0 features/support/transforms.rb