module ActiveFixture::SearchMethods::ClassMethods
Public Instance Methods
all()
click to toggle source
# File lib/active_fixture/search_methods.rb, line 11 def all fixtures.to_a.map { |fixture| new(fixture) } end
find_by(attribute, value)
click to toggle source
# File lib/active_fixture/search_methods.rb, line 19 def find_by(attribute, value) all.select { |fixture| fixture.send(attribute) == value } end
select(id)
click to toggle source
# File lib/active_fixture/search_methods.rb, line 15 def select(id) all.find { |o| o.id == id } || raise(FixtureNotFound.new(id)) end