Sha256: ebb5a2eb07d5f1f405ffc8b5eba388ae6f172de3b0823c0bbfb064d721d77068

Contents?: true

Size: 415 Bytes

Versions: 16

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module DataAccessible
    # Returns the contents as a String.
    def to_s
      output || content || ""
    end

    # Accessor for data properties by Liquid.
    #
    # property - The String name of the property to retrieve.
    #
    # Returns the String value or nil if the property isn't included.
    def [](property)
      data[property]
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bridgetown-core-0.19.3 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.19.2 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.19.1 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.19.0 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.6 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.5 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.4 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.3 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.2 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.1 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.18.0 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.17.1 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.17.0 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.16.0 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.16.0.beta2 lib/bridgetown-core/concerns/data_accessible.rb
bridgetown-core-0.16.0.beta1 lib/bridgetown-core/concerns/data_accessible.rb