Class: Plivo::DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/plivo/template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fallback_value: nil) ⇒ DateTime

Returns a new instance of DateTime.



88
89
90
# File 'lib/plivo/template.rb', line 88

def initialize(fallback_value: nil)
  @fallback_value = fallback_value
end

Instance Attribute Details

#fallback_valueObject

Returns the value of attribute fallback_value.



86
87
88
# File 'lib/plivo/template.rb', line 86

def fallback_value
  @fallback_value
end

Instance Method Details

#to_hashObject



92
93
94
95
96
# File 'lib/plivo/template.rb', line 92

def to_hash
  {
    fallback_value: @fallback_value
  }.reject { |_, v| v.nil? }
end