Class: Analytics::Interactor::Event
- Inherits:
-
Object
- Object
- Analytics::Interactor::Event
- Defined in:
- lib/ios_analytics_cli/interactors/event.rb
Class Method Summary collapse
-
.all_enum_properties(events) ⇒ Object
Returns all properties, from all events, which uses an enum as the value.
- .enum_properties_from_event(event) ⇒ Object
Class Method Details
.all_enum_properties(events) ⇒ Object
Returns all properties, from all events, which uses an enum as the value.
7 8 9 10 11 12 |
# File 'lib/ios_analytics_cli/interactors/event.rb', line 7 def self.all_enum_properties(events) events .reject { |event| event['properties'].nil? } .flat_map { |event| event['properties'] } .reject { |property| property['values'].nil? } end |
.enum_properties_from_event(event) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/ios_analytics_cli/interactors/event.rb', line 14 def self.enum_properties_from_event(event) properties = event['properties'] return nil if properties.nil? properties.reject { |property| property['values'].nil? } end |