Class: Verokrypto::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/verokrypto/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Event

Returns a new instance of Event.



8
9
10
# File 'lib/verokrypto/event.rb', line 8

def initialize(source)
  @source = source
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



5
6
7
# File 'lib/verokrypto/event.rb', line 5

def date
  @date
end

#feeObject

Returns the value of attribute fee.



5
6
7
# File 'lib/verokrypto/event.rb', line 5

def fee
  @fee
end

#kindObject (readonly)

Returns the value of attribute kind.



5
6
7
# File 'lib/verokrypto/event.rb', line 5

def kind
  @kind
end

#originalObject

Returns the value of attribute original.



6
7
8
# File 'lib/verokrypto/event.rb', line 6

def original
  @original
end

#sourceObject (readonly)

Returns the value of attribute source.



5
6
7
# File 'lib/verokrypto/event.rb', line 5

def source
  @source
end

Instance Method Details

#valid!Object



12
13
14
15
16
17
# File 'lib/verokrypto/event.rb', line 12

def valid!
  return if @date && @fee

  pp self
  raise 'not valid'
end