Class: Uchi::Ui::Index::TurboFrame

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/uchi/ui/index/turbo_frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository:, scope: nil, src: nil) ⇒ TurboFrame

Returns a new instance of TurboFrame.



16
17
18
19
20
21
# File 'app/components/uchi/ui/index/turbo_frame.rb', line 16

def initialize(repository:, scope: nil, src: nil)
  super()
  @repository = repository
  @scope = scope
  @src = src
end

Instance Attribute Details

#repositoryObject (readonly)

Returns the value of attribute repository.



7
8
9
# File 'app/components/uchi/ui/index/turbo_frame.rb', line 7

def repository
  @repository
end

#scopeObject (readonly)

Returns the value of attribute scope.



7
8
9
# File 'app/components/uchi/ui/index/turbo_frame.rb', line 7

def scope
  @scope
end

#srcObject (readonly)

Returns the value of attribute src.



7
8
9
# File 'app/components/uchi/ui/index/turbo_frame.rb', line 7

def src
  @src
end

Instance Method Details

#callObject



9
10
11
12
13
14
# File 'app/components/uchi/ui/index/turbo_frame.rb', line 9

def call
  helpers
    .turbo_frame_tag(turbo_frame_id, **options) {
      content
    }
end