Class: Crm::RoomLayoutPreviewComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/crm/room_layout_preview_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(room_configuration:, size: '92x61>') ⇒ RoomLayoutPreviewComponent

Returns a new instance of RoomLayoutPreviewComponent.



7
8
9
10
# File 'app/components/crm/room_layout_preview_component.rb', line 7

def initialize(room_configuration:, size: '92x61>')
  @room_configuration = room_configuration
  @size = size
end

Instance Attribute Details

#room_configurationObject (readonly)

Returns the value of attribute room_configuration.



5
6
7
# File 'app/components/crm/room_layout_preview_component.rb', line 5

def room_configuration
  @room_configuration
end

#sizeObject (readonly)

Returns the value of attribute size.



5
6
7
# File 'app/components/crm/room_layout_preview_component.rb', line 5

def size
  @size
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/components/crm/room_layout_preview_component.rb', line 12

def render?
  room_configuration.present?
end