Class: Jbuilder::Schema::Template::Configuration
- Inherits:
-
Object
- Object
- Jbuilder::Schema::Template::Configuration
- Defined in:
- lib/jbuilder/schema/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(object: nil, object_title: nil, object_description: nil) ⇒ Object
28 29 30 |
# File 'lib/jbuilder/schema/template.rb', line 28 def self.build(object: nil, object_title: nil, object_description: nil, **) new(object: object, title: object_title, description: object_description) end |
Instance Method Details
#description ⇒ Object
36 37 38 |
# File 'lib/jbuilder/schema/template.rb', line 36 def description super || translate(Jbuilder::Schema.description_name) end |
#title ⇒ Object
32 33 34 |
# File 'lib/jbuilder/schema/template.rb', line 32 def title super || translate(Jbuilder::Schema.title_name) end |
#translate_field(key) ⇒ Object
40 41 42 |
# File 'lib/jbuilder/schema/template.rb', line 40 def translate_field(key) translate("fields.#{key}.#{Jbuilder::Schema.description_name}") end |