Module: EADCodec::WithText
- Defined in:
- lib/eadcodec.rb
Overview
Module included in classes that have text and other elements as subelements
Instance Method Summary collapse
Instance Method Details
#initialize(value = nil) ⇒ Object
60 61 62 63 64 |
# File 'lib/eadcodec.rb', line 60 def initialize(value=nil) value = [] if not value value = [value] if not value.is_a? Array value.each{|v| self << v} end |
#value ⇒ Object
66 67 68 |
# File 'lib/eadcodec.rb', line 66 def value self.subelements[0].to_s end |