Class: TakuhaiStatus::Sagawa
- Inherits:
-
Object
- Object
- TakuhaiStatus::Sagawa
- Defined in:
- lib/takuhai_status/sagawa.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #finish? ⇒ Boolean
-
#initialize(key) ⇒ Sagawa
constructor
A new instance of Sagawa.
Constructor Details
#initialize(key) ⇒ Sagawa
Returns a new instance of Sagawa.
8 9 10 11 |
# File 'lib/takuhai_status/sagawa.rb', line 8 def initialize(key) @key = key.gsub(/[^0-9]/, '') @time, @state = check end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/takuhai_status/sagawa.rb', line 6 def key @key end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/takuhai_status/sagawa.rb', line 6 def state @state end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
6 7 8 |
# File 'lib/takuhai_status/sagawa.rb', line 6 def time @time end |
Instance Method Details
#finish? ⇒ Boolean
13 14 15 |
# File 'lib/takuhai_status/sagawa.rb', line 13 def finish? return !!(@state =~ /営業所へお問い合わせ下さい。|配達は終了致しました。$|^配達完了/) end |