Class: Moonrope::Helper
- Inherits:
-
Object
- Object
- Moonrope::Helper
- Defined in:
- lib/moonrope/helper.rb
Instance Attribute Summary collapse
-
#block ⇒ Proc
readonly
The proc to execute.
-
#controller ⇒ Moonrope::Controller
readonly
The controller this helper belongs to.
-
#name ⇒ Symbol
readonly
The name of the helper.
-
#options ⇒ Hash
readonly
Options for this helper.
Instance Method Summary collapse
-
#initialize(name, controller, options = {}) { ... } ⇒ Helper
constructor
Initialize a new helper.
Constructor Details
#initialize(name, controller, options = {}) { ... } ⇒ Helper
Initialize a new helper
23 24 25 26 27 28 |
# File 'lib/moonrope/helper.rb', line 23 def initialize(name, controller, = {}, &block) @name = name @controller = controller @options = @block = block end |
Instance Attribute Details
#block ⇒ Proc (readonly)
Returns the proc to execute.
11 12 13 |
# File 'lib/moonrope/helper.rb', line 11 def block @block end |
#controller ⇒ Moonrope::Controller (readonly)
Returns the controller this helper belongs to.
8 9 10 |
# File 'lib/moonrope/helper.rb', line 8 def controller @controller end |
#name ⇒ Symbol (readonly)
Returns the name of the helper.
5 6 7 |
# File 'lib/moonrope/helper.rb', line 5 def name @name end |
#options ⇒ Hash (readonly)
Returns options for this helper.
14 15 16 |
# File 'lib/moonrope/helper.rb', line 14 def @options end |