Class: Plivo::DateTime
- Inherits:
-
Object
- Object
- Plivo::DateTime
- Defined in:
- lib/plivo/template.rb
Instance Attribute Summary collapse
-
#fallback_value ⇒ Object
Returns the value of attribute fallback_value.
Instance Method Summary collapse
-
#initialize(fallback_value: nil) ⇒ DateTime
constructor
A new instance of DateTime.
- #to_hash ⇒ Object
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_value ⇒ Object
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_hash ⇒ Object
90 91 92 93 94 |
# File 'lib/plivo/template.rb', line 90 def to_hash { fallback_value: @fallback_value }.reject { |_, v| v.nil? } end |