Class: RBlade::StackManager::Stack
- Inherits:
-
Object
- Object
- RBlade::StackManager::Stack
- Defined in:
- lib/rblade/helpers/stack_manager.rb
Instance Method Summary collapse
-
#initialize ⇒ Stack
constructor
A new instance of Stack.
- #prepend(code) ⇒ Object
- #push(code) ⇒ Object
- #set_before_stack(before_stack) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Stack
Returns a new instance of Stack.
36 37 38 39 |
# File 'lib/rblade/helpers/stack_manager.rb', line 36 def initialize @prepends = "" @stack = "" end |
Instance Method Details
#prepend(code) ⇒ Object
53 54 55 |
# File 'lib/rblade/helpers/stack_manager.rb', line 53 def prepend code @prepends << code end |
#push(code) ⇒ Object
49 50 51 |
# File 'lib/rblade/helpers/stack_manager.rb', line 49 def push code @stack << code end |
#set_before_stack(before_stack) ⇒ Object
41 42 43 |
# File 'lib/rblade/helpers/stack_manager.rb', line 41 def set_before_stack before_stack @before_stack = before_stack end |
#to_s ⇒ Object
45 46 47 |
# File 'lib/rblade/helpers/stack_manager.rb', line 45 def to_s "#{@before_stack}#{@prepends}#{@stack}" end |