Class: Quilt::Performance::NavigationMetadata
- Inherits:
-
Object
- Object
- Quilt::Performance::NavigationMetadata
- Defined in:
- lib/quilt_rails/performance/navigation_metadata.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#supports_detailed_events ⇒ Object
Returns the value of attribute supports_detailed_events.
-
#supports_detailed_time ⇒ Object
Returns the value of attribute supports_detailed_time.
Class Method Summary collapse
Instance Method Summary collapse
- #has_size? ⇒ Boolean
-
#initialize(index:, supports_detailed_events:, supports_detailed_time:) ⇒ NavigationMetadata
constructor
A new instance of NavigationMetadata.
Constructor Details
#initialize(index:, supports_detailed_events:, supports_detailed_time:) ⇒ NavigationMetadata
Returns a new instance of NavigationMetadata.
18 19 20 21 22 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 18 def initialize(index:, supports_detailed_events:, supports_detailed_time:) @index = index @supports_detailed_time = supports_detailed_time @supports_detailed_events = supports_detailed_events end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
6 7 8 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 6 def index @index end |
#supports_detailed_events ⇒ Object
Returns the value of attribute supports_detailed_events.
8 9 10 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 8 def supports_detailed_events @supports_detailed_events end |
#supports_detailed_time ⇒ Object
Returns the value of attribute supports_detailed_time.
7 8 9 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 7 def supports_detailed_time @supports_detailed_time end |
Class Method Details
.from_params(params = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 10 def self.from_params(params = {}) NavigationMetadata.new( index: params[:index], supports_detailed_time: params[:supports_detailed_time], supports_detailed_events: params[:supports_detailed_events], ) end |
Instance Method Details
#has_size? ⇒ Boolean
24 25 26 |
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 24 def has_size? !size.nil? end |