Class: LesliView::Items::Actions

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/lesli_view/items/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource, path_to_create: nil, path_to_update: nil) ⇒ Actions

Returns a new instance of Actions.



38
39
40
41
42
# File 'lib/lesli_view/items/actions.rb', line 38

def initialize(resource, path_to_create:nil, path_to_update:nil)
    @resource = resource
    @path_to_create = path_to_create
    @path_to_update = path_to_update
end

Instance Attribute Details

#path_to_createObject (readonly)

Returns the value of attribute path_to_create.



36
37
38
# File 'lib/lesli_view/items/actions.rb', line 36

def path_to_create
  @path_to_create
end

#resourceObject (readonly)

Returns the value of attribute resource.



36
37
38
# File 'lib/lesli_view/items/actions.rb', line 36

def resource
  @resource
end