class MatchData
Public Instance Methods
to_hash()
click to toggle source
# File lib/Olib.rb, line 16 def to_hash Hash[self.names.zip(self.captures.map(&:strip).map do |capture| if capture.is_i? then capture.to_i else capture end end)] end
to_struct()
click to toggle source
# File lib/Olib.rb, line 12 def to_struct OpenStruct.new to_hash end