Class: SchemaDotOrg::BlogPosting
- Inherits:
-
SchemaType
- Object
- SchemaType
- SchemaDotOrg::BlogPosting
- Defined in:
- app/models/schema_dot_org/blog_posting.rb
Constant Summary
Constants inherited from SchemaType
SchemaType::ROOT_ATTR, SchemaType::UNQUALIFIED_CLASS_NAME_REGEX
Instance Attribute Summary
Attributes inherited from SchemaType
Instance Method Summary collapse
-
#_to_json_struct ⇒ Object
Schema.org expects wordCount (camelCase) as a number, not "wordcount".
Methods inherited from SchemaType
attribute, #initialize, #to_json, #to_json_ld, #to_json_struct, #to_s, #un_namespaced_classname
Constructor Details
This class inherits a constructor from SchemaDotOrg::SchemaType
Instance Method Details
#_to_json_struct ⇒ Object
Schema.org expects wordCount (camelCase) as a number, not "wordcount".
30 31 32 33 34 35 36 |
# File 'app/models/schema_dot_org/blog_posting.rb', line 30 def _to_json_struct h = super if (wc = h.delete('wordcount')).present? h['wordCount'] = wc.to_s.to_i end h end |