Class: Alchemy::ElementsBlockHelper::BlockHelper

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/alchemy/elements_block_helper.rb

Overview

Base class for our block-level helpers.

Direct Known Subclasses

ElementViewHelper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(helpers, opts = {}) ⇒ BlockHelper

Returns a new instance of BlockHelper.



14
15
16
17
# File 'app/helpers/alchemy/elements_block_helper.rb', line 14

def initialize(helpers, opts = {})
  @helpers = helpers
  @opts = opts
end

Instance Attribute Details

#helpersObject (readonly)

Returns the value of attribute helpers.



11
12
13
# File 'app/helpers/alchemy/elements_block_helper.rb', line 11

def helpers
  @helpers
end

#optsObject (readonly)

Returns the value of attribute opts.



12
13
14
# File 'app/helpers/alchemy/elements_block_helper.rb', line 12

def opts
  @opts
end

Instance Method Details

#elementObject



19
20
21
# File 'app/helpers/alchemy/elements_block_helper.rb', line 19

def element
  opts[:element]
end