Class: WhereTo::Location

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/where_to/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_location) ⇒ Location

Returns a new instance of Location.



6
7
8
9
# File 'lib/where_to/location.rb', line 6

def initialize(from_location)
  @location = from_location
  set_filename_folder_from_location
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



4
5
6
# File 'lib/where_to/location.rb', line 4

def filename
  @filename
end

#folderObject

Returns the value of attribute folder.



4
5
6
# File 'lib/where_to/location.rb', line 4

def folder
  @folder
end

#locationObject

Returns the value of attribute location.



4
5
6
# File 'lib/where_to/location.rb', line 4

def location
  @location
end

Instance Method Details

#<=>(other) ⇒ Object



11
12
13
# File 'lib/where_to/location.rb', line 11

def <=>(other)
  location <=> other
end