Class: Nagoro::Element

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Element

Returns a new instance of Element.



5
6
7
# File 'lib/nagoro/element.rb', line 5

def initialize(content)
  @content = content.strip
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



3
4
5
# File 'lib/nagoro/element.rb', line 3

def content
  @content
end

#paramsObject

Returns the value of attribute params.



3
4
5
# File 'lib/nagoro/element.rb', line 3

def params
  @params
end

Class Method Details

.inherited(klass) ⇒ Object



19
20
21
# File 'lib/nagoro/element.rb', line 19

def self.inherited(klass)
  Nagoro::Pipe::Element::ELEMENTS[klass.to_s] = klass
end

Instance Method Details

#renderObject



9
10
11
# File 'lib/nagoro/element.rb', line 9

def render
  @content
end