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_days ⇒ Object

Returns the value of attribute adv_days.



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

def adv_days
  @adv_days
end

#cou ⇒ Object 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

#cty ⇒ Object 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

#dist ⇒ Object

Returns the value of attribute dist.



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

def dist
  @dist
end

#id ⇒ Object

Returns the value of attribute id.



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

def id
  @id
end

#img ⇒ Object

Returns the value of attribute img.



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

def img
  @img
end

#img_base ⇒ Object

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_days ⇒ Object

Returns the value of attribute inside_days.



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

def inside_days
  @inside_days
end

#lat ⇒ Object

Returns the value of attribute lat.



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

def lat
  @lat
end

#lon ⇒ Object

Returns the value of attribute lon.



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

def lon
  @lon
end

#nm ⇒ Object 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_req ⇒ Object

Returns the value of attribute on_req.



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

def on_req
  @on_req
end

#promo ⇒ Object

Returns the value of attribute promo.



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

def promo
  @promo
end

#rating ⇒ Object

Returns the value of attribute rating.



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

def rating
  @rating
end

#s_ar ⇒ Object 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_cou ⇒ Object 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_reg ⇒ Object 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

#st ⇒ Object 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

#xid ⇒ Object

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