Sha256: eb10a5a92f0b3c359fc0673f417220047778a17e60cf391e85622be98bf25339

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module PlatformosCheck
  module PlatformosLiquid
    class SourceIndex
      class ObjectEntry < BaseEntry
        def properties
          (hash['properties'] || [])
            .map do |prop_hash|
              PropertyEntry.new(prop_hash, hash['name'])
            end
        end

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
platformos-check-0.3.0 lib/platformos_check/platformos_liquid/source_index/object_entry.rb
platformos-check-0.2.2 lib/platformos_check/platformos_liquid/source_index/object_entry.rb
platformos-check-0.2.1 lib/platformos_check/platformos_liquid/source_index/object_entry.rb
platformos-check-0.2.0 lib/platformos_check/platformos_liquid/source_index/object_entry.rb