class Evva::Config
Constants
- CONFIG_STRUCT
- DICTIONARY_STRUCT
- GOOGLE_SHEET_STRUCT
Public Class Methods
new(hash:)
click to toggle source
# File lib/evva/config.rb, line 3 def initialize(hash:) @hash = hash.deep_symbolize @hash.validate_structure!(CONFIG_STRUCT) unless dict_struct = DICTIONARY_STRUCT[@hash[:data_source][:type]] raise ArgumentError, "unknown data source type '#{@hash[:data_source][:type]}'" end @hash[:data_source].validate_structure!(dict_struct) end
Public Instance Methods
data_source()
click to toggle source
# File lib/evva/config.rb, line 18 def data_source @hash[:data_source] end
event_enum_file_name()
click to toggle source
# File lib/evva/config.rb, line 38 def event_enum_file_name @hash[:event_enum_file_name] end
event_file_name()
click to toggle source
# File lib/evva/config.rb, line 30 def event_file_name @hash[:event_file_name] end
out_path()
click to toggle source
# File lib/evva/config.rb, line 26 def out_path @hash[:out_path] end
package_name()
click to toggle source
# File lib/evva/config.rb, line 46 def package_name @hash[:package_name] end
people_file_name()
click to toggle source
# File lib/evva/config.rb, line 34 def people_file_name @hash[:people_file_name] end
special_enum_file_name()
click to toggle source
# File lib/evva/config.rb, line 42 def special_enum_file_name @hash[:special_enum_file_name] end
to_h()
click to toggle source
# File lib/evva/config.rb, line 14 def to_h @hash end
type()
click to toggle source
# File lib/evva/config.rb, line 22 def type @hash[:type] end