Class: Quilt::Performance::NavigationMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/quilt_rails/performance/navigation_metadata.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#indexObject

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_eventsObject

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_timeObject

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

Returns:

  • (Boolean)


24
25
26
# File 'lib/quilt_rails/performance/navigation_metadata.rb', line 24

def has_size?
  !size.nil?
end