Class: PlatformosCheck::PlatformosLiquid::SourceIndex::ObjectEntry

Inherits:
BaseEntry
  • Object
show all
Defined in:
lib/platformos_check/platformos_liquid/source_index/object_entry.rb

Constant Summary

Constants inherited from BaseEntry

BaseEntry::PLATFORMOS_DOCUMENTATION_URL

Instance Attribute Summary

Attributes inherited from BaseEntry

#hash, #return_type

Instance Method Summary collapse

Methods inherited from BaseEntry

#deprecated?, #deprecation_reason, #description, #initialize, #name, #return_type_instance, #summary

Constructor Details

This class inherits a constructor from PlatformosCheck::PlatformosLiquid::SourceIndex::BaseEntry

Instance Method Details

#app_file_typeObject



22
23
24
# File 'lib/platformos_check/platformos_liquid/source_index/object_entry.rb', line 22

def app_file_type
  hash.dig('access', 'app_file_type')
end

#global?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/platformos_check/platformos_liquid/source_index/object_entry.rb', line 18

def global?
  hash.dig('access', 'global')
end

#platformos_documentation_urlObject



14
15
16
# File 'lib/platformos_check/platformos_liquid/source_index/object_entry.rb', line 14

def platformos_documentation_url
  "#{PLATFORMOS_DOCUMENTATION_URL}/developer-guide/variables/context-variable##{hash['name']}"
end

#propertiesObject



7
8
9
10
11
12
# File 'lib/platformos_check/platformos_liquid/source_index/object_entry.rb', line 7

def properties
  (hash['properties'] || [])
    .map do |prop_hash|
      PropertyEntry.new(prop_hash, hash['name'])
    end
end