Class: M9t::Distance

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/m9t/distance.rb

Overview

Represents a distance

Constant Summary collapse

DEFAULT_OPTIONS =
{
  units: :meters, abbreviated: false, precision: 5
}
CONVERSIONS =
{
  meters:     1.0,
  kilometers: 1.0 / 1000.0,
  feet:       1.0 / 0.3048,
  miles:      1.0 / 1609.344
}

Instance Attribute Summary

Attributes included from Base

#options, #value

Method Summary

Methods included from Base

add_options, generate_conversions, included, #initialize, #method_missing, #respond_to?, #to_s

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class M9t::Base