Sha256: bab1ba5d8a782d1cc501275b646defc17ba3eb3609db11d0797f17bbb5d0c30a

Contents?: true

Size: 351 Bytes

Versions: 2

Compression:

Stored size: 351 Bytes

Contents

class Parelation::Criteria::Select < Parelation::Criteria

  # @return [Regexp] the select format.
  #
  SELECT_FORMAT = /^select$/

  # @param param [String]
  # @return [TrueClass, FalseClass]
  #
  def self.match?(param)
    !!param.match(SELECT_FORMAT)
  end

  # @return [ActiveRecord::Relation]
  #
  def call
    chain.select(*value)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
parelation-1.0.0 lib/parelation/criteria/select.rb
parelation-0.2.0 lib/parelation/criteria/select.rb