Parent

Methods

NamedArg

Attributes

name[R]
type[R]

Public Class Methods

new(s) click to toggle source
# File lib/generators/cucumber/feature/named_arg.rb, line 5
def initialize(s)
  @name, @type = *s.split(':')
end

Public Instance Methods

value(n) click to toggle source
# File lib/generators/cucumber/feature/named_arg.rb, line 9
def value(n)
  if @type == 'boolean'
    (n % 2) == 0
  else
    "#{@name} #{n}"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.