Method: Edgarj::SearchForm::Operator#exp

Defined in:
app/models/edgarj/search_form.rb

#exp(attr) ⇒ Object

generate a part of expression like ‘=?’, ‘ in(?)’, etc.

When operator contains place-holder ‘?’, it is not appended.



81
82
83
84
85
86
87
88
89
90
91
# File 'app/models/edgarj/search_form.rb', line 81

def exp(attr)
  if @attrs[attr]
    if @attrs[attr].index('?')
      @attrs[attr]
    else
      @attrs[attr] + '?'
    end
  else
    '=?'
  end
end