Class: Uchi::Field::Base::Index

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/uchi/field/base.rb

Overview

Uchi::Field::Base::Index components render fields in the index view.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field:, record:, repository:) ⇒ Index

Returns a new instance of Index.



47
48
49
50
51
52
53
# File 'app/components/uchi/field/base.rb', line 47

def initialize(field:, record:, repository:)
  super()

  @field = field
  @record = record
  @repository = repository
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



37
38
39
# File 'app/components/uchi/field/base.rb', line 37

def field
  @field
end

#recordObject (readonly)

Returns the value of attribute record.



37
38
39
# File 'app/components/uchi/field/base.rb', line 37

def record
  @record
end

#repositoryObject (readonly)

Returns the value of attribute repository.



37
38
39
# File 'app/components/uchi/field/base.rb', line 37

def repository
  @repository
end

Class Method Details

.classes_for_table_cellObject

Returns the CSS classes to apply to the td or th of the table where this field is rendered.



42
43
44
# File 'app/components/uchi/field/base.rb', line 42

def classes_for_table_cell
  []
end