Sha256: 63d148a233bfaafebf5dae8f8acea1670ecfd08dd1abcdd675774a93c4e42334

Contents?: true

Size: 593 Bytes

Versions: 9

Compression:

Stored size: 593 Bytes

Contents

module RailsEdgeTest::Dsl
  Action = Struct.new(:name, :controller_class) do
    def initialize(*args)
      super
      @edges = {}
      @let_handler = LetHandler.new
    end

    def edge(description, &block)
      edge = Edge.new(description, name, controller_class)
      @edges[edge] = block
    end

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

    def generate(title, &block)
      @let_handler.add_definition("generate_#{title}", &block)
    end

    def __edges
      @edges
    end

    def __let_handler
      @let_handler
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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