Class: WinewooCore::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/winewoo_core/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

attr_accessor :interpro_criterions_repo attr_accessor :interpro_producers_repo attr_accessor :interpro_vintages_repo attr_accessor :interpro_wines_repo attr_accessor :interpro_winewoo_user_logs_repo attr_accessor :interpro_winewoo_users_repo



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/winewoo_core/configuration.rb', line 41

def initialize
  @hello_sentence = "Hello World !"
  @authorizer = Services::Authorizers::NullAuthorizer
  @cellar_repo = Repositories::Mongo::CellarMongoRepo
  @comments_repo = Repositories::Mongo::CommentsMongoRepo
  @criterions_repo = Repositories::Mongo::CriterionsMongoRepo
  @favorites_repo = Repositories::Mongo::FavoritesMongoRepo
  @history_repo = Repositories::Mongo::HistoryMongoRepo
  @log_repo = Repositories::Mongo::WinewooUserLogsMongoRepo
  @users_repo = Repositories::Mongo::UsersMongoRepo
  @producers_repo = Repositories::Mongo::ProducersMongoRepo
  @vintages_repo = Repositories::Mongo::VintagesMongoRepo
  @wines_repo = Repositories::Mongo::WinesMongoRepo
  @winewoo_user_devices_repo = Repositories::Mongo::WinewooUserDevicesMongoRepo
  @winewoo_user_logs_repo = Repositories::Mongo::WinewooUserLogsMongoRepo
  @winewoo_users_repo = Repositories::Mongo::WinewooUsersMongoRepo
  @feed_repo = Repositories::ElasticSearch::FeedElasticRepo
  @global_wine_data_repo = Repositories::Mongo::GlobalWineDataMongoRepo
  @award_repo = Repositories::Mongo::AwardMongoRepo
end

Instance Attribute Details

#authorizerObject

What is the provider of the authorize method ? An authorizer must have an authorize method which will be called by each use case on the current ressource. For example the Back Office uses Pundit.



15
16
17
# File 'lib/winewoo_core/configuration.rb', line 15

def authorizer
  @authorizer
end

#award_repoObject

Returns the value of attribute award_repo.



33
34
35
# File 'lib/winewoo_core/configuration.rb', line 33

def award_repo
  @award_repo
end

#cellar_repoObject

REPOSITORIES FOR USE CASES



18
19
20
# File 'lib/winewoo_core/configuration.rb', line 18

def cellar_repo
  @cellar_repo
end

#comments_repoObject

Returns the value of attribute comments_repo.



19
20
21
# File 'lib/winewoo_core/configuration.rb', line 19

def comments_repo
  @comments_repo
end

#criterions_repoObject

Returns the value of attribute criterions_repo.



20
21
22
# File 'lib/winewoo_core/configuration.rb', line 20

def criterions_repo
  @criterions_repo
end

#favorites_repoObject

Returns the value of attribute favorites_repo.



21
22
23
# File 'lib/winewoo_core/configuration.rb', line 21

def favorites_repo
  @favorites_repo
end

#feed_repoObject

Returns the value of attribute feed_repo.



31
32
33
# File 'lib/winewoo_core/configuration.rb', line 31

def feed_repo
  @feed_repo
end

#global_wine_data_repoObject

Returns the value of attribute global_wine_data_repo.



32
33
34
# File 'lib/winewoo_core/configuration.rb', line 32

def global_wine_data_repo
  @global_wine_data_repo
end

#hello_sentenceObject

This is a default variable used to test the behaviour of the gem. Configure it in an initializer and you will be able to call Winewoo.hello! to get it and see that the gem is imported and can be configured.



9
10
11
# File 'lib/winewoo_core/configuration.rb', line 9

def hello_sentence
  @hello_sentence
end

#history_repoObject

Returns the value of attribute history_repo.



22
23
24
# File 'lib/winewoo_core/configuration.rb', line 22

def history_repo
  @history_repo
end

#log_repoObject

Returns the value of attribute log_repo.



23
24
25
# File 'lib/winewoo_core/configuration.rb', line 23

def log_repo
  @log_repo
end

#producers_repoObject

Returns the value of attribute producers_repo.



25
26
27
# File 'lib/winewoo_core/configuration.rb', line 25

def producers_repo
  @producers_repo
end

#users_repoObject

Returns the value of attribute users_repo.



24
25
26
# File 'lib/winewoo_core/configuration.rb', line 24

def users_repo
  @users_repo
end

#vintages_repoObject

Returns the value of attribute vintages_repo.



26
27
28
# File 'lib/winewoo_core/configuration.rb', line 26

def vintages_repo
  @vintages_repo
end

#wines_repoObject

Returns the value of attribute wines_repo.



27
28
29
# File 'lib/winewoo_core/configuration.rb', line 27

def wines_repo
  @wines_repo
end

#winewoo_user_devices_repoObject

Returns the value of attribute winewoo_user_devices_repo.



28
29
30
# File 'lib/winewoo_core/configuration.rb', line 28

def winewoo_user_devices_repo
  @winewoo_user_devices_repo
end

#winewoo_user_logs_repoObject

Returns the value of attribute winewoo_user_logs_repo.



29
30
31
# File 'lib/winewoo_core/configuration.rb', line 29

def winewoo_user_logs_repo
  @winewoo_user_logs_repo
end

#winewoo_users_repoObject

Returns the value of attribute winewoo_users_repo.



30
31
32
# File 'lib/winewoo_core/configuration.rb', line 30

def winewoo_users_repo
  @winewoo_users_repo
end