Class: ThemeCheck::ShopifyLiquid::SourceIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/theme_check/shopify_liquid/source_index.rb,
lib/theme_check/shopify_liquid/source_index/tag_entry.rb,
lib/theme_check/shopify_liquid/source_index/tag_state.rb,
lib/theme_check/shopify_liquid/source_index/base_entry.rb,
lib/theme_check/shopify_liquid/source_index/base_state.rb,
lib/theme_check/shopify_liquid/source_index/filter_entry.rb,
lib/theme_check/shopify_liquid/source_index/filter_state.rb,
lib/theme_check/shopify_liquid/source_index/object_entry.rb,
lib/theme_check/shopify_liquid/source_index/object_state.rb,
lib/theme_check/shopify_liquid/source_index/property_entry.rb,
lib/theme_check/shopify_liquid/source_index/parameter_entry.rb,
lib/theme_check/shopify_liquid/source_index/return_type_entry.rb

Defined Under Namespace

Classes: BaseEntry, BaseState, FilterEntry, FilterState, ObjectEntry, ObjectState, ParameterEntry, PropertyEntry, ReturnTypeEntry, TagEntry, TagState

Class Method Summary collapse

Class Method Details

.filtersObject



10
11
12
13
14
15
16
# File 'lib/theme_check/shopify_liquid/source_index.rb', line 10

def filters
  @filters = nil if FilterState.outdated?

  @filters ||= FilterState.mark_up_to_date &&
    load_file(:filters)
      .map { |hash| FilterEntry.new(hash) }
end

.objectsObject



18
19
20
21
22
23
24
25
# File 'lib/theme_check/shopify_liquid/source_index.rb', line 18

def objects
  @objects = nil if ObjectState.outdated?

  @objects ||= ObjectState.mark_up_to_date &&
    load_file(:objects)
      .concat(built_in_objects)
      .map { |hash| ObjectEntry.new(hash) }
end

.tagsObject



27
28
29
30
31
32
33
# File 'lib/theme_check/shopify_liquid/source_index.rb', line 27

def tags
  @tags = nil if TagState.outdated?

  @tags ||= TagState.mark_up_to_date &&
    load_file(:tags)
      .map { |hash| TagEntry.new(hash) }
end