Sha256: 1c4fb5fcf88ba96960b61616440d969672eee22f890b969ec4bda9982c489f72
Contents?: true
Size: 553 Bytes
Versions: 3
Compression:
Stored size: 553 Bytes
Contents
module CanTango module Filter class Base attr_reader :item, :include_list def initialize item, list = nil @item = item.to_sym @include_list = list || [] end def valid? return false if !in_include_list? return false if not_only? !excluded? end def in_include_list? return false if include_list.blank? include_list.include? item end def not_only? false end def excluded? false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cantango-core-0.1.2 | lib/cantango/filter/base.rb |
cantango-core-0.1.1 | lib/cantango/filter/base.rb |
cantango-core-0.1.0 | lib/cantango/filter/base.rb |