Class: ApplicationEntity
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ApplicationEntity
show all
- Defined in:
- app/entities/application_entity.rb
Direct Known Subclasses
AnswerEntity, ArticleEntity, BreadcrumbListEntity, FaqPageEntity, ImageObjectEntity, ListItemEntity, OfferEntity, OrganizationEntity, PersonEntity, ProductEntity, QuestionEntity, RatingEntity, ReviewEntity, WebPageEntity
Constant Summary
collapse
- DEFAULT_CONTEXT =
'https://schema.org'
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
15
16
17
|
# File 'app/entities/application_entity.rb', line 15
def (key, value)
[key] = value
end
|
11
12
13
|
# File 'app/entities/application_entity.rb', line 11
def
@extras ||= {}
end
|
.type(value) ⇒ Object
19
20
21
|
# File 'app/entities/application_entity.rb', line 19
def type(value)
('@type', value)
end
|
Instance Method Details
#dump(ref = nil) ⇒ Object
32
33
34
|
# File 'app/entities/application_entity.rb', line 32
def dump(ref = nil)
@dump ||= (ref).merge(dump_attributes)
end
|
#to_h ⇒ Object
24
25
26
|
# File 'app/entities/application_entity.rb', line 24
def to_h
dump
end
|
#to_json(*args) ⇒ Object
28
29
30
|
# File 'app/entities/application_entity.rb', line 28
def to_json(*args)
super.html_safe
end
|