Class: Saruman::ControllerBuilderAction
- Inherits:
-
Object
- Object
- Saruman::ControllerBuilderAction
- Includes:
- Virtus
- Defined in:
- lib/saruman.rb
Instance Method Summary collapse
- #block_as ⇒ Object
- #block_name ⇒ Object
- #block_template ⇒ Object
-
#initialize(action) ⇒ ControllerBuilderAction
constructor
A new instance of ControllerBuilderAction.
- #layout_handle(extension_name, controller_name) ⇒ Object
Constructor Details
#initialize(action) ⇒ ControllerBuilderAction
Returns a new instance of ControllerBuilderAction.
359 360 361 362 363 364 365 366 367 368 |
# File 'lib/saruman.rb', line 359 def initialize(action) @segs = action.split(":") case segs.length when 1 @visibility = "public" @respond_to = "html" @name = segs.first @method_name = "#{name}Action" end end |
Instance Method Details
#block_as ⇒ Object
380 381 382 |
# File 'lib/saruman.rb', line 380 def block_as "#{@extension_name}#{@controller_name}#{name}" end |
#block_name ⇒ Object
376 377 378 |
# File 'lib/saruman.rb', line 376 def block_name "#{@extension_name}#{@controller_name}#{name}" end |
#block_template ⇒ Object
384 385 386 |
# File 'lib/saruman.rb', line 384 def block_template "#{@extension_name}/#{@controller_name}/#{name}.phtml" end |
#layout_handle(extension_name, controller_name) ⇒ Object
370 371 372 373 374 |
# File 'lib/saruman.rb', line 370 def layout_handle(extension_name, controller_name) @extension_name = extension_name @controller_name = controller_name "#{@extension_name}_#{@controller_name}_#{name}" end |