Class: Yuriita::Inputs::Expression

Inherits:
Struct
  • Object
show all
Defined in:
lib/yuriita/inputs/expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#qualifierObject

Returns the value of attribute qualifier

Returns:

  • (Object)

    the current value of qualifier



3
4
5
# File 'lib/yuriita/inputs/expression.rb', line 3

def qualifier
  @qualifier
end

#termObject

Returns the value of attribute term

Returns:

  • (Object)

    the current value of term



3
4
5
# File 'lib/yuriita/inputs/expression.rb', line 3

def term
  @term
end

Instance Method Details

#to_sObject



4
5
6
7
8
9
10
# File 'lib/yuriita/inputs/expression.rb', line 4

def to_s
  if term.match?(" ")
    "#{qualifier}:\"#{term}\""
  else
    "#{qualifier}:#{term}"
  end
end