Class: Shrinker::Parser::Abstract
- Inherits:
-
Struct
- Object
- Struct
- Shrinker::Parser::Abstract
- Defined in:
- lib/shrinker/parser/abstract.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#content ⇒ Object
Returns the value of attribute content.
Class Method Summary collapse
-
.replace(content, attributes = {}, config = nil) ⇒ Object
Delegate replace to an instance.
Instance Method Summary collapse
-
#initialize(content = nil, attributes = nil, config = nil) ⇒ Abstract
constructor
A new instance of Abstract.
- #replace ⇒ Object
Constructor Details
#initialize(content = nil, attributes = nil, config = nil) ⇒ Abstract
Returns a new instance of Abstract.
11 12 13 14 |
# File 'lib/shrinker/parser/abstract.rb', line 11 def initialize(content = nil, attributes = nil, config = nil) super(content, attributes) merge_config(config) end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes
3 4 5 |
# File 'lib/shrinker/parser/abstract.rb', line 3 def attributes @attributes end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/shrinker/parser/abstract.rb', line 4 def config @config end |
#content ⇒ Object
Returns the value of attribute content
3 4 5 |
# File 'lib/shrinker/parser/abstract.rb', line 3 def content @content end |
Class Method Details
.replace(content, attributes = {}, config = nil) ⇒ Object
Delegate replace to an instance
7 8 9 |
# File 'lib/shrinker/parser/abstract.rb', line 7 def self.replace(content, attributes = {}, config = nil) self.new(content, attributes, config).replace end |
Instance Method Details
#replace ⇒ Object
16 17 18 |
# File 'lib/shrinker/parser/abstract.rb', line 16 def replace raise "Shrinker::Parser::Abstract.replace not implemented" end |