Sha256: e1a23a643bdac235b4938361a9f4fa84ab6f91f0223d53f7aa9ab76cb110352a

Contents?: true

Size: 336 Bytes

Versions: 3

Compression:

Stored size: 336 Bytes

Contents

module Dusen
  class Description

    attr_reader :syntax

    def initialize
      @syntax = Syntax.new
    end

    def search_by(field, &scoper)
      @syntax.learn_field(field, &scoper)
    end

    def self.read_syntax(&dsl)
      description = new
      description.instance_eval(&dsl)
      description.syntax
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dusen-0.2.1 lib/dusen/description.rb
dusen-0.2.0 lib/dusen/description.rb
dusen-0.1.0 lib/dusen/description.rb