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

ElementEditorHelper, ElementViewHelper

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BlockHelper.



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

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

Instance Method Details

#elementObject



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

def element
  opts[:element]
end

#helpersObject



22
23
24
# File 'app/helpers/alchemy/elements_block_helper.rb', line 22

def helpers
  @helpers
end

#optsObject



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

def opts
  @opts
end