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
62 63 64 65 66 |
# File 'lib/eadcodec.rb', line 62 def initialize(value=nil) value = [] if not value value = [value] if not value.is_a? Array value.each{|v| self << v} end |
#value ⇒ Object
68 69 70 |
# File 'lib/eadcodec.rb', line 68 def value self.subelements[0].to_s end |