Sha256: febe1b75eb29f5a6fc1a7ec3a726caa770716c4a72a9bfa18ff17f0ca4b4c067
Contents?: true
Size: 472 Bytes
Versions: 3
Compression:
Stored size: 472 Bytes
Contents
class Step attr_reader :message attr_reader :body, :parent def initialize(hash) @body = hash[:body] @parent = hash[:parent] raise "No body given" unless body end def to_html s = <<-END <h3 class="step">#{body}</h3> END s.strip end def aggregate! @message = first_part + args_string self end def has_args? !args.empty? end def args @args ||= body.scan(/'([^']*)'/).map {|a| a[0]} end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
features-0.3.0 | lib/step.rb |
features-0.2.1 | lib/step.rb |
features-0.2.0 | lib/step.rb |