Class: Nero::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nero.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config_dirObject

Returns the value of attribute config_dir.



50
51
52
# File 'lib/nero.rb', line 50

def config_dir
  @config_dir
end

#tagsObject (readonly)

Returns the value of attribute tags.



50
51
52
# File 'lib/nero.rb', line 50

def tags
  @tags
end

Instance Method Details

#add_tag(name, klass: BaseTag, &block) ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/nero.rb', line 56

def add_tag(name, klass: BaseTag, &block)
  klass, klass_options = klass

  (@tags ||= {})[name] = {klass:}.tap do |h|
    h[:block] = block if block
    h[:options] = klass_options if klass_options
  end
end