Class: GolfSwitch::Course

Inherits:
Object
  • Object
show all
Defined in:
lib/golf_switch/course.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adv_daysObject

Returns the value of attribute adv_days.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def adv_days
  @adv_days
end

#couObject Also known as: country

Returns the value of attribute cou.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def cou
  @cou
end

#ctyObject Also known as: city

Returns the value of attribute cty.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def cty
  @cty
end

#distObject

Returns the value of attribute dist.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def dist
  @dist
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def id
  @id
end

#imgObject

Returns the value of attribute img.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def img
  @img
end

#img_baseObject

Returns the value of attribute img_base.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def img_base
  @img_base
end

#inside_daysObject

Returns the value of attribute inside_days.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def inside_days
  @inside_days
end

#latObject

Returns the value of attribute lat.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def lon
  @lon
end

#nmObject Also known as: name

Returns the value of attribute nm.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def nm
  @nm
end

#on_reqObject

Returns the value of attribute on_req.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def on_req
  @on_req
end

#promoObject

Returns the value of attribute promo.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def promo
  @promo
end

#ratingObject

Returns the value of attribute rating.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def rating
  @rating
end

#s_arObject Also known as: area_id

Returns the value of attribute s_ar.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def s_ar
  @s_ar
end

#s_couObject Also known as: country_id

Returns the value of attribute s_cou.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def s_cou
  @s_cou
end

#s_regObject Also known as: regon_id

Returns the value of attribute s_reg.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def s_reg
  @s_reg
end

#stObject Also known as: state

Returns the value of attribute st.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def st
  @st
end

#xidObject

Returns the value of attribute xid.



4
5
6
# File 'lib/golf_switch/course.rb', line 4

def xid
  @xid
end

Instance Method Details

#img_url(protocol = "https") ⇒ Object



18
19
20
21
22
23
24
# File 'lib/golf_switch/course.rb', line 18

def img_url(protocol="https")
  if @img
    "#{protocol}://#{img_base.to_s}/#{self.id}/#{img.to_s}".gsub("\/\/",'/')
  else
     ""
  end
end