class GoogleMapsAPI::Core::Metric

Attributes

text[R]
value[R]

Public Class Methods

from_hash(hash) click to toggle source
# File lib/google_maps_api/core/metric.rb, line 17
def self.from_hash(hash)
  self.new(hash["text"], hash["value"])
end
new(text, value) click to toggle source
# File lib/google_maps_api/core/metric.rb, line 4
def initialize(text, value)
  @text = text.to_s
  @value = value.to_i
end

Public Instance Methods

to_i() click to toggle source
# File lib/google_maps_api/core/metric.rb, line 13
def to_i
  value
end
to_s() click to toggle source
# File lib/google_maps_api/core/metric.rb, line 9
def to_s
  text
end