Class: SlimHelperLibrary

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyslim/slim_helper_library.rb

Constant Summary collapse

ACTOR_INSTANCE_NAME =
"scriptTableActor"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(executor = nil) ⇒ SlimHelperLibrary

Returns a new instance of SlimHelperLibrary.



5
6
7
8
# File 'lib/rubyslim/slim_helper_library.rb', line 5

def initialize(executor = nil)
  @executor = executor
  @fixtures = []
end

Instance Attribute Details

#executorObject

Returns the value of attribute executor.



3
4
5
# File 'lib/rubyslim/slim_helper_library.rb', line 3

def executor
  @executor
end

Instance Method Details

#get_fixtureObject



10
11
12
# File 'lib/rubyslim/slim_helper_library.rb', line 10

def get_fixture
  executor.instance(ACTOR_INSTANCE_NAME)
end

#pop_fixtureObject



19
20
21
22
# File 'lib/rubyslim/slim_helper_library.rb', line 19

def pop_fixture
  executor.set_instance(ACTOR_INSTANCE_NAME, @fixtures.pop)
  nil
end

#push_fixtureObject



14
15
16
17
# File 'lib/rubyslim/slim_helper_library.rb', line 14

def push_fixture
  @fixtures << get_fixture
  nil
end