Class: SchemaDotOrg::SearchAction

Inherits:
SchemaType
  • Object
show all
Defined in:
lib/schema_dot_org/search_action.rb

Overview

Model the Schema.org ‘Thing > SearchAction`. See schema.org/SearchAction

Constant Summary

Constants inherited from SchemaType

SchemaDotOrg::SchemaType::ROOT_ATTR, SchemaDotOrg::SchemaType::UNQUALIFIED_CLASS_NAME_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SchemaType

#to_json, #to_json_ld, #to_json_struct, #to_s, #un_namespaced_classname

Instance Attribute Details

#query_inputObject

Returns the value of attribute query_input.



7
8
9
# File 'lib/schema_dot_org/search_action.rb', line 7

def query_input
  @query_input
end

#targetObject

Returns the value of attribute target.



7
8
9
# File 'lib/schema_dot_org/search_action.rb', line 7

def target
  @target
end

Instance Method Details

#_to_json_structObject



11
12
13
14
15
16
# File 'lib/schema_dot_org/search_action.rb', line 11

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