Class: ShowtimeInfo
- Inherits:
-
Object
- Object
- ShowtimeInfo
- Defined in:
- lib/model/showtime_info.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#obs ⇒ Object
Returns the value of attribute obs.
-
#omelete_movie_id ⇒ Object
Returns the value of attribute omelete_movie_id.
-
#theater ⇒ Object
Returns the value of attribute theater.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(omelete_movie_id, obs, kind, time, theater) ⇒ ShowtimeInfo
constructor
A new instance of ShowtimeInfo.
- #pretty_obs(obs) ⇒ Object
Constructor Details
#initialize(omelete_movie_id, obs, kind, time, theater) ⇒ ShowtimeInfo
Returns a new instance of ShowtimeInfo.
4 5 6 |
# File 'lib/model/showtime_info.rb', line 4 def initialize(omelete_movie_id, obs, kind, time, theater) self.omelete_movie_id, self.obs, self.kind, self.time, self.theater = omelete_movie_id, pretty_obs(obs), kind, time, theater end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
2 3 4 |
# File 'lib/model/showtime_info.rb', line 2 def kind @kind end |
#obs ⇒ Object
Returns the value of attribute obs.
2 3 4 |
# File 'lib/model/showtime_info.rb', line 2 def obs @obs end |
#omelete_movie_id ⇒ Object
Returns the value of attribute omelete_movie_id.
2 3 4 |
# File 'lib/model/showtime_info.rb', line 2 def omelete_movie_id @omelete_movie_id end |
#theater ⇒ Object
Returns the value of attribute theater.
2 3 4 |
# File 'lib/model/showtime_info.rb', line 2 def theater @theater end |
#time ⇒ Object
Returns the value of attribute time.
2 3 4 |
# File 'lib/model/showtime_info.rb', line 2 def time @time end |
Instance Method Details
#pretty_obs(obs) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/model/showtime_info.rb', line 8 def pretty_obs(obs) if obs while obs.match(/\.[A-Z] | feriado[A-Z]/) do obs.insert(obs.index(/\.[A-Z]/) + 1, "\n") if obs.match(/\.[A-Z]/) obs.insert(obs.index(/feriado[A-Z]/) + 7, "\n") if obs.match(/feriado[A-Z]/) end end obs end |