Class: HyperAdmin::DSL::Show
- Inherits:
-
Object
- Object
- HyperAdmin::DSL::Show
- Defined in:
- lib/hyper_admin/dsl/show.rb
Instance Method Summary collapse
-
#initialize(resource_class) ⇒ Show
constructor
A new instance of Show.
- #row(attribute, type: infer_type(attribute), human: human_name(attribute)) ⇒ Object
Constructor Details
#initialize(resource_class) ⇒ Show
Returns a new instance of Show.
5 6 7 8 |
# File 'lib/hyper_admin/dsl/show.rb', line 5 def initialize(resource_class) @resource_class = resource_class @rows = [] end |
Instance Method Details
#row(attribute, type: infer_type(attribute), human: human_name(attribute)) ⇒ Object
10 11 12 |
# File 'lib/hyper_admin/dsl/show.rb', line 10 def row(attribute, type: infer_type(attribute), human: human_name(attribute)) @rows << { attribute: attribute, type: type, human: human } end |