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.



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

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

Instance Attribute Details

#fallback_valueObject

Returns the value of attribute fallback_value.



91
92
93
# File 'lib/plivo/template.rb', line 91

def fallback_value
  @fallback_value
end

Instance Method Details

#to_hashObject



97
98
99
100
101
# File 'lib/plivo/template.rb', line 97

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