class Snafu::Models::Location
Defines a generic location class with id
and name
properties.
Attributes
name[R]
Public Instance Methods
id()
click to toggle source
# File lib/snafu/models/location.rb, line 12 def id @id.to_s end
initializer(options={})
click to toggle source
Accepts an options hash with :id
or :name
# File lib/snafu/models/location.rb, line 8 def initializer(options={}) @id = options[:id].to_s @name = options[:name] end
to_s()
click to toggle source
# File lib/snafu/models/location.rb, line 15 def to_s "Glitch Generic Location: ID: #{self.id} - Name: #{self.name}" end