class Gottani::Core
Constants
- FORMAT
Attributes
common[R]
type[R]
Public Class Methods
new(type, base)
click to toggle source
# File lib/gottani_core.rb, line 21 def initialize(type, base) instance = FORMAT[type].new @common = instance.send "#{type}_to_common", base end
Public Instance Methods
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
# File lib/gottani_core.rb, line 26 def method_missing(method_name, *args, &block) method_name.match(/^to_(.*)$/) super unless Regexp.last_match[1] instance = FORMAT[Regexp.last_match[1].to_sym].new return instance.send("to_#{Regexp.last_match[1]}", @common) if instance super end