Class: BBCoder::Configuration
- Inherits:
-
Object
- Object
- BBCoder::Configuration
- Defined in:
- lib/bbcoder/configuration.rb
Instance Attribute Summary collapse
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
- #[](value) ⇒ Object
- #clear ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #remove(name) ⇒ Object
- #tag(name, options = {}, &block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/bbcoder/configuration.rb', line 5 def initialize = {} end |
Instance Attribute Details
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/bbcoder/configuration.rb', line 3 def end |
Instance Method Details
#[](value) ⇒ Object
9 10 11 |
# File 'lib/bbcoder/configuration.rb', line 9 def [](value) [value] end |
#clear ⇒ Object
13 14 15 |
# File 'lib/bbcoder/configuration.rb', line 13 def clear = {} end |
#remove(name) ⇒ Object
17 18 19 |
# File 'lib/bbcoder/configuration.rb', line 17 def remove name .delete(name.to_sym) end |
#tag(name, options = {}, &block) ⇒ Object
21 22 23 |
# File 'lib/bbcoder/configuration.rb', line 21 def tag(name, = {}, &block) [name.to_sym] = BBCoder::Tag.new(name.to_sym, .merge(:block => block)) end |