Class: ReleaseFeature::Repository::ActiveRecordRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/release_feature/repository/active_record_repository.rb

Instance Method Summary collapse

Constructor Details

#initialize(model:) ⇒ ActiveRecordRepository

Returns a new instance of ActiveRecordRepository.

Parameters:

  • model (Class)


7
8
9
# File 'lib/release_feature/repository/active_record_repository.rb', line 7

def initialize(model:)
  @model = model
end

Instance Method Details

#featuresReleaseFeature::FeatureCollection



12
13
14
15
# File 'lib/release_feature/repository/active_record_repository.rb', line 12

def features
  data = @model.all
  convert_to_feature_collection(data)
end