Class: TTY2::Prompt::Question::Checks::CheckModifier

Inherits:
Object
  • Object
show all
Defined in:
lib/tty2/prompt/question/checks.rb

Overview

Check if modifications are applicable

Class Method Summary collapse

Class Method Details

.call(question, value) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/tty2/prompt/question/checks.rb', line 11

def self.call(question, value)
  if !question.modifier.nil? || question.modifier
    [Modifier.new(question.modifier).apply_to(value)]
  else
    [value]
  end
end