Module: Padrino::Generators::Actions

Included in:
Decorator
Defined in:
lib/generators/decorator.rb

Overview

Decorator

Instance Method Summary collapse

Instance Method Details

#apply_test_component_for_decorator_by(choice) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/generators/decorator.rb', line 60

def apply_test_component_for_decorator_by(choice)
  path = File.expand_path(File.dirname(__FILE__) + "/components/tests/#{choice}.rb")
  say_status :apply, "tests/#{choice}"
  shell.padding += 1
  instance_eval(File.read(path))
  shell.padding -= 1
end