Class: VcrStripeWebhook::EventCassette::Wait

Inherits:
Object
  • Object
show all
Defined in:
lib/vcr_stripe_webhook/event_cassette.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wait_start, wait_end) ⇒ Wait

Returns a new instance of Wait.



110
111
112
113
# File 'lib/vcr_stripe_webhook/event_cassette.rb', line 110

def initialize(wait_start, wait_end)
  @start = wait_start
  @end = wait_end
end

Instance Attribute Details

#endObject (readonly)

Returns the value of attribute end.



108
109
110
# File 'lib/vcr_stripe_webhook/event_cassette.rb', line 108

def end
  @end
end

#startObject (readonly)

Returns the value of attribute start.



108
109
110
# File 'lib/vcr_stripe_webhook/event_cassette.rb', line 108

def start
  @start
end

Class Method Details

.from_hash(hash) ⇒ Object



123
124
125
# File 'lib/vcr_stripe_webhook/event_cassette.rb', line 123

def from_hash(hash)
  Wait.new(hash["start"], hash["end"])
end

Instance Method Details

#to_hObject



115
116
117
118
119
120
# File 'lib/vcr_stripe_webhook/event_cassette.rb', line 115

def to_h
  {
    "start" => start,
    "end" => self.end
  }
end