Sha256: eda06f58fed3b7a1a7387446bd0de67272b2bcb4b33ea8f9b997460ee212d347

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 Bytes

Contents

module RailsEdgeTest::Dsl
  Controller = Struct.new(:controller_class) do
    def initialize(*args)
      super
      @actions = []
      @let_handler = LetHandler.new
    end

    def action(name, &block)
      new_action = Action.new(name, controller_class)
      new_action.instance_exec(&block)
      @actions << new_action
    end

    def let(title, &block)
      @let_handler.add_definition(title, &block)
    end

    def __actions
      @actions
    end

    def __let_handler
      @let_handler
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails_edge_test-1.1.1 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-1.1.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-0.8.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-1.0.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-0.7.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-0.6.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-0.5.0 lib/rails_edge_test/dsl/controller.rb
rails_edge_test-0.4.0 lib/rails_edge_test/dsl/controller.rb