Class: HeaderStruct

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/net/nntp/article.rb

Overview

a slightly modified OpenStruct

Instance Method Summary collapse

Instance Method Details

#add_pair(key, value) ⇒ Object

adds of modifies a new key/value pair



6
7
8
9
# File 'lib/net/nntp/article.rb', line 6

def add_pair(key, value)
  @table[key.to_sym] = value
  new_ostruct_member(key)
end