Class: Megatron::BoxHelper::BoxMessage

Inherits:
Helper
  • Object
show all
Defined in:
app/helpers/megatron/box_helper.rb

Instance Method Summary collapse

Methods inherited from Helper

inherited

Constructor Details

#initialize(options = {}) ⇒ BoxMessage

Returns a new instance of BoxMessage.



4
5
6
# File 'app/helpers/megatron/box_helper.rb', line 4

def initialize(options = {})
  @options = options
end

Instance Method Details

#display(body) ⇒ Object



8
9
10
11
12
# File 'app/helpers/megatron/box_helper.rb', line 8

def display(body)
  @options[:body] = body
  @options[:class] ||= ''
  render partial: "megatron/shared/box_message", locals: { options: @options }
end