Module: DriveTime
- Includes:
- ActiveSupport::Inflector, Log4r
- Defined in:
- lib/drive_time.rb,
lib/drive_time/loader.rb,
lib/drive_time/version.rb,
lib/drive_time/model_store.rb,
lib/drive_time/class_name_map.rb,
lib/drive_time/field_expander.rb,
lib/drive_time/bi_directional_hash.rb,
lib/drive_time/builders/join_builder.rb,
lib/drive_time/builders/name_builder.rb,
lib/drive_time/converters/worksheet_converter.rb,
lib/drive_time/converters/spreadsheets_converter.rb
Defined Under Namespace
Classes: BiDirectionalHash, ClassNameMap, FieldExpander, JoinBuilder, Loader, MissingAssociationError, ModelStore, NameBuilder, SpreadsheetsConverter, TokenExpansionError, WorksheetConverter
Constant Summary
collapse
- Logger =
Create constants for loggers - available in inner classes
Log4r::Logger.new ' Primary '
- VERSION =
"0.0.3"
- @@log_level =
INFO
Class Method Summary
collapse
Class Method Details
.class_name_from_title(title) ⇒ Object
55
56
57
|
# File 'lib/drive_time.rb', line 55
def self.class_name_from_title(title)
self.underscore_from_text(title).classify
end
|
.is_affirmative?(value) ⇒ Boolean
59
60
61
62
63
64
|
# File 'lib/drive_time.rb', line 59
def self.is_affirmative?(value)
return false if !value
value.
strip.
downcase == 'yes' || value.downcase == 'y'
end
|
.log_level=(log_level) ⇒ Object
66
67
68
69
|
# File 'lib/drive_time.rb', line 66
def self.log_level=(log_level)
@@log_level = log_level
Logger.level = log_level
end
|
.underscore_from_text(text) ⇒ Object
51
52
53
|
# File 'lib/drive_time.rb', line 51
def self.underscore_from_text(text)
text.strip.downcase.parameterize('_')
end
|