Sha256: dba4d6ca1ca6082d5a265146a48a69083616fbad1274e0334200768c1943d75a
Contents?: true
Size: 642 Bytes
Versions: 20
Compression:
Stored size: 642 Bytes
Contents
module Runby # Base class for all run types class RunType def description 'No description' end def explanation 'No explanation' 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
20 entries across 20 versions & 1 rubygems