Class: Tarantool::Client::Interval
- Inherits:
-
Data
- Object
- Data
- Tarantool::Client::Interval
- Defined in:
- tarantool-client/lib/tarantool/client/interval.rb
Overview
A Tarantool datetime.interval; adjust is :none, :excess or :last.
Instance Attribute Summary collapse
-
#adjust ⇒ Object
readonly
Returns the value of attribute adjust.
-
#day ⇒ Object
readonly
Returns the value of attribute day.
-
#hour ⇒ Object
readonly
Returns the value of attribute hour.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#month ⇒ Object
readonly
Returns the value of attribute month.
-
#nsec ⇒ Object
readonly
Returns the value of attribute nsec.
-
#sec ⇒ Object
readonly
Returns the value of attribute sec.
-
#week ⇒ Object
readonly
Returns the value of attribute week.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year: 0, month: 0, week: 0, day: 0, hour: 0, min: 0, sec: 0, nsec: 0, adjust: :none) ⇒ Interval
constructor
A new instance of Interval.
Constructor Details
#initialize(year: 0, month: 0, week: 0, day: 0, hour: 0, min: 0, sec: 0, nsec: 0, adjust: :none) ⇒ Interval
Returns a new instance of Interval.
7 8 9 10 11 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 7 def initialize(year: 0, month: 0, week: 0, day: 0, hour: 0, min: 0, sec: 0, nsec: 0, adjust: :none) units = { year:, month:, week:, day:, hour:, min:, sec:, nsec: } validate_units(units) super end |
Instance Attribute Details
#adjust ⇒ Object (readonly)
Returns the value of attribute adjust
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def adjust @adjust end |
#day ⇒ Object (readonly)
Returns the value of attribute day
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def day @day end |
#hour ⇒ Object (readonly)
Returns the value of attribute hour
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def hour @hour end |
#min ⇒ Object (readonly)
Returns the value of attribute min
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def min @min end |
#month ⇒ Object (readonly)
Returns the value of attribute month
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def month @month end |
#nsec ⇒ Object (readonly)
Returns the value of attribute nsec
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def nsec @nsec end |
#sec ⇒ Object (readonly)
Returns the value of attribute sec
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def sec @sec end |
#week ⇒ Object (readonly)
Returns the value of attribute week
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def week @week end |
#year ⇒ Object (readonly)
Returns the value of attribute year
6 7 8 |
# File 'tarantool-client/lib/tarantool/client/interval.rb', line 6 def year @year end |