Class: Alchemy::Admin::Message

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/alchemy/admin/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, type: :info, dismissable: false) ⇒ Message

Returns a new instance of Message.



12
13
14
15
16
# File 'app/components/alchemy/admin/message.rb', line 12

def initialize(message = nil, type: :info, dismissable: false)
  @message = message
  @dismissable = dismissable
  @type = type
end

Instance Attribute Details

#dismissableObject (readonly)

Returns the value of attribute dismissable.



4
5
6
# File 'app/components/alchemy/admin/message.rb', line 4

def dismissable
  @dismissable
end

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'app/components/alchemy/admin/message.rb', line 4

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'app/components/alchemy/admin/message.rb', line 4

def type
  @type
end