Sha256: 1a2d0bfe42734543e827686a536d428c08f29242d71d09f95f4b53b6828a7a4a
Contents?: true
Size: 1.07 KB
Versions: 13
Compression:
Stored size: 1.07 KB
Contents
# -*- encoding : utf-8 -*- module MDWA module DSL # singleton class class Requirements attr_accessor :nodes def initialize @nodes ||= {} end def self.instance @__instance__ ||= new end # # Register a new requirement in the list. # def register( summary = nil ) # retrive or initialize a entity req = Requirement.new( summary ) yield(req) if block_given? add_node(req) # add to the list end # # Add note to the entity list # Prevents entity duplication # def add_node(node) @nodes[node.alias] = node end def element(e) @nodes[e] end def all @nodes.values end def clear @nodes.clear end end # class # return the requirements instance def self.requirements Requirements.instance end def self.requirement(name) self.requirements.element(name) end end # dsl end # mdd
Version data entries
13 entries across 13 versions & 1 rubygems