class Sped2DB::Layout
Constants
- VERSIONS
Attributes
type[R]
version[R]
Public Class Methods
new(type, version)
click to toggle source
# File lib/sped2db/layout.rb, line 10 def initialize(type, version) raise ArgumentError, 'type is nil' if type.nil? type = type.to_sym layouts = VERSIONS.keys.join(', ') raise ArgumentError, "type must be one of #{layouts}" unless VERSIONS.key? type raise ArgumentError, 'version is nil' if version.nil? versions = VERSIONS[type].join(', ') raise ArgumentError, "version must be one of #{versions}" unless versions.include? version @type = type @version = version end
Public Instance Methods
to_s()
click to toggle source
# File lib/sped2db/layout.rb, line 28 def to_s "SPED #{type.to_s.capitalize} v#{version}" end