Class: Uchi::Field::Base::Show

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

Overview

Uchi::Field::Base::Show components render fields in the show view.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Show.



26
27
28
29
30
31
32
# File 'app/components/uchi/field/base.rb', line 26

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

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

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



24
25
26
# File 'app/components/uchi/field/base.rb', line 24

def field
  @field
end

#recordObject (readonly)

Returns the value of attribute record.



24
25
26
# File 'app/components/uchi/field/base.rb', line 24

def record
  @record
end

#repositoryObject (readonly)

Returns the value of attribute repository.



24
25
26
# File 'app/components/uchi/field/base.rb', line 24

def repository
  @repository
end