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.



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

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

Instance Attribute Details

#fallback_valueObject

Returns the value of attribute fallback_value.



84
85
86
# File 'lib/plivo/template.rb', line 84

def fallback_value
  @fallback_value
end

Instance Method Details

#to_hashObject



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

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