Class: InternetBoxLogger::GenericBox
- Inherits:
-
Object
- Object
- InternetBoxLogger::GenericBox
- Includes:
- ElasticSearch
- Defined in:
- lib/internet_box_logger/generic_box.rb
Instance Method Summary collapse
-
#initialize(box_type) ⇒ GenericBox
constructor
A new instance of GenericBox.
- #log_box_info ⇒ Object
Methods included from ElasticSearch
Constructor Details
#initialize(box_type) ⇒ GenericBox
Returns a new instance of GenericBox.
7 8 9 10 11 12 |
# File 'lib/internet_box_logger/generic_box.rb', line 7 def initialize(box_type) box_type = box_type.to_s if box_type.is_a? Symbol box_type = self.class.const_get box_type if box_type.is_a? String box_parser_module = box_type if InternetBoxLogger::Parsers[].include? box_type self.extend box_parser_module end |
Instance Method Details
#log_box_info ⇒ Object
14 15 16 |
# File 'lib/internet_box_logger/generic_box.rb', line 14 def log_box_info save if get_box_data end |