Class: EasyTags::Options::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_tags/options/collection.rb

Overview

Represents collection of options

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Collection


5
6
7
# File 'lib/easy_tags/options/collection.rb', line 5

def initialize(options)
  @options = options.uniq
end

Instance Method Details

#itemsString


15
16
17
# File 'lib/easy_tags/options/collection.rb', line 15

def items
  filtered_options
end

#valid?Boolean


10
11
12
# File 'lib/easy_tags/options/collection.rb', line 10

def valid?
  filtered_options.all?(&:valid?)
end