Sha256: ece69cd1a64b3e014eddb510c584985abd51cbecec5b6391283a8d005ed3a820

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true


module SchemaDotOrg
  # Model the Schema.org `Thing > SearchAction`.  See http://schema.org/SearchAction
  class SearchAction < SchemaType
    attr_accessor :target, :query_input
    validates :target,      type: String, presence: true
    validates :query_input, type: String, presence: true

    def _to_json_struct
      {
        'target' => target,
        'query-input' => query_input ## ! Note the hyphen.
      }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
schema_dot_org-2.1 lib/schema_dot_org/search_action.rb
schema_dot_org-2.0 lib/schema_dot_org/search_action.rb
schema_dot_org-1.8 lib/schema_dot_org/search_action.rb