Class: Arugula::QuestionPart

Inherits:
Part
  • Object
show all
Includes:
MatchNTimes
Defined in:
lib/arugula/parts.rb

Instance Attribute Summary

Attributes included from Wrapping

#wrapped

Instance Method Summary collapse

Methods included from MatchNTimes

#match

Methods inherited from Part

all, inherited, type

Constructor Details

#initialize(*args) ⇒ QuestionPart

Returns a new instance of QuestionPart.


257
258
259
# File 'lib/arugula/parts.rb', line 257

def initialize(*args)
  super(*args, times: 0..1)
end

Instance Method Details

#to_sObject


261
262
263
# File 'lib/arugula/parts.rb', line 261

def to_s
  "#{wrapped}?"
end