Class: FlexiAdmin::Components::Resources::ViewComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/flexi_admin/components/resources/view_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ ViewComponent

Returns a new instance of ViewComponent.



10
11
12
13
# File 'lib/flexi_admin/components/resources/view_component.rb', line 10

def initialize(context)
  @context = context
  @title = context.options[:title]
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/flexi_admin/components/resources/view_component.rb', line 5

def context
  @context
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/flexi_admin/components/resources/view_component.rb', line 5

def title
  @title
end