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 Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BlockHelper.



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

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

Instance Attribute Details

#helpersObject (readonly)

Returns the value of attribute helpers.



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

def helpers
  @helpers
end

#optsObject (readonly)

Returns the value of attribute opts.



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

def opts
  @opts
end

Instance Method Details

#elementObject



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

def element
  opts[:element]
end