Class: Brrr::Feed::Element

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Element

Returns a new instance of Element.



6
7
8
# File 'lib/brrr/feed/element.rb', line 6

def initialize(node)
  self.node = node
end

Instance Attribute Details

#node=(value) ⇒ Object

Sets the attribute node

Parameters:

  • value

    the value to set the attribute node to.



4
5
6
# File 'lib/brrr/feed/element.rb', line 4

def node=(value)
  @node = value
end

Instance Method Details

#valueObject



10
11
12
# File 'lib/brrr/feed/element.rb', line 10

def value
  node.content unless node.content.empty?
end