Sha256: d3ffa51e6b44e5bf7c02ade69973d2de9ddd056a299bd53d75ce3c93f212574c
Contents?: true
Size: 594 Bytes
Versions: 23
Compression:
Stored size: 594 Bytes
Contents
module Runby # Base class for all run types class RunType def description 'No description' end def lookup_pace(five_k_time, distance_units = :km) end end # Extends RunTypes with additional methods. # Since RunTypes is autogenerated in all_run_types.g.rb, we needed a safe way of adding behavior to it # without complicating the codegen. module RunTypes # Returns an initialized run type, given the name of an existing run type def self.new_from_name(run_type_name) Object.const_get("Runby::RunTypes::#{run_type_name}").new end end end
Version data entries
23 entries across 23 versions & 1 rubygems