class Gherkin::AstNode
def add(rule_type, obj)
def add(rule_type, obj) @_sub_items[rule_type].push(obj) end
def get_items(rule_type)
def get_items(rule_type) @_sub_items[rule_type] end
def get_single(rule_type)
def get_single(rule_type) @_sub_items[rule_type].first end
def get_token(token_type)
def get_token(token_type) get_single(token_type) end
def get_tokens(token_type)
def get_tokens(token_type) @_sub_items[token_type] end
def initialize(rule_type)
def initialize(rule_type) @rule_type = rule_type @_sub_items = Hash.new { |hash, key| hash[key] = [] } # returns [] for unknown key end