Class: Temporal::PlainTime

Inherits:
Object
  • Object
show all
Defined in:
lib/temporal/plain_time.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0) ⇒ PlainTime

Returns a new instance of PlainTime.



7
8
9
10
11
12
13
14
15
# File 'lib/temporal/plain_time.rb', line 7

def initialize(hour = 0, minute = 0, second = 0,
               millisecond = 0, microsecond = 0, nanosecond = 0)
  self.hour = hour
  self.minute = minute
  self.second = second
  self.millisecond = millisecond
  self.microsecond = microsecond
  self.nanosecond = nanosecond
end

Instance Attribute Details

#hourObject

Returns the value of attribute hour.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def hour
  @hour
end

#microsecondObject

Returns the value of attribute microsecond.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def microsecond
  @microsecond
end

#millisecondObject

Returns the value of attribute millisecond.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def millisecond
  @millisecond
end

#minuteObject

Returns the value of attribute minute.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def minute
  @minute
end

#nanosecondObject

Returns the value of attribute nanosecond.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def nanosecond
  @nanosecond
end

#secondObject

Returns the value of attribute second.



5
6
7
# File 'lib/temporal/plain_time.rb', line 5

def second
  @second
end