Class: Gillbus::TripOptions
- Inherits:
-
Object
- Object
- Gillbus::TripOptions
show all
- Extended by:
- Fields
- Includes:
- UpdateAttrs
- Defined in:
- lib/gillbus/structs/trip_options.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Fields
parse, parser, parser_class
#initialize, #update_attrs
Class Method Details
.build_blank ⇒ Object
93
94
95
96
97
98
99
|
# File 'lib/gillbus/structs/trip_options.rb', line 93
def self.build_blank
options = new
field_definitions.each do |name:, type:, key:, root:|
options.send(:"#{name}=", []) if type.is_a?(Array)
end
options
end
|
Instance Method Details
#advertising ⇒ Object
85
86
87
|
# File 'lib/gillbus/structs/trip_options.rb', line 85
def advertising
promo.include?('ADVERTISING')
end
|
#busfor_recommend ⇒ Object
89
90
91
|
# File 'lib/gillbus/structs/trip_options.rb', line 89
def busfor_recommend
promo.include?('BUSFOR_RECOMMEND')
end
|