Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/codshit.rb

Instance Method Summary collapse

Instance Method Details

#choicesObject



104
105
106
# File 'lib/codshit.rb', line 104

def choices
  [dup]
end

#to_textObject



108
109
110
# File 'lib/codshit.rb', line 108

def to_text
  map { |p| p.to_text }.join('')
end

#|(other) ⇒ Object



100
101
102
# File 'lib/codshit.rb', line 100

def |(other)
  ::Codshit::Choice.new(*(choices + other.choices))
end