Class: TickTock::Card Private

Inherits:
Object
  • Object
show all
Defined in:
lib/tick_tock/card.rb,
lib/tick_tock/card.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The representation of a “punch card” used by the default Punch implementation

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject, parent_card, time_in, time_out) ⇒ Card

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Card.

Parameters:

  • subject (Object)

    Description of subject of this card

  • parent_card (Card, nil)
  • time_in (Time, nil)
  • time_out (Time, nil)


15
# File 'lib/tick_tock/card.rb', line 15

def initialize(subject, parent_card, time_in, time_out); end

Instance Attribute Details

#parent_cardCard? (readonly)

Returns the current value of parent_card.

Returns:

  • (Card, nil)

    the current value of parent_card



1
2
3
# File 'lib/tick_tock/card.rb', line 1

def parent_card
  @parent_card
end

#subjectObject (readonly)

Description of subject of this card

Returns:

  • (Object)

    the current value of subject



41
42
43
# File 'lib/tick_tock/card.rb', line 41

def subject
  @subject
end

#time_inTime? (readonly)

Returns the current value of time_in.

Returns:

  • (Time, nil)

    the current value of time_in



1
2
3
# File 'lib/tick_tock/card.rb', line 1

def time_in
  @time_in
end

#time_outTime? (readonly)

Returns the current value of time_out.

Returns:

  • (Time, nil)

    the current value of time_out



1
2
3
# File 'lib/tick_tock/card.rb', line 1

def time_out
  @time_out
end

Class Method Details

.with(subject:, parent_card:, time_in:, time_out:) ⇒ Card

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Constructor accepting keyword args.

Parameters:

  • subject (Object)

    Description of subject of this card

  • parent_card (Card, nil)
  • time_in (Time, nil)
  • time_out (Time, nil)

Returns:



9
# File 'lib/tick_tock/card.rb', line 9

def self.with(subject:, parent_card:, time_in:, time_out:); end

Instance Method Details

#with(subject: nil, parent_card: nil, time_in: nil, time_out: nil) ⇒ Card

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a copy of this instance with any given values replaced.

Parameters:

  • subject (Object) (defaults to: nil)

    Description of subject of this card

  • parent_card (Card, nil) (defaults to: nil)
  • time_in (Time, nil) (defaults to: nil)
  • time_out (Time, nil) (defaults to: nil)

Returns:

  • (Card)

    a copy of this instance with any given values replaced.



24
25
# File 'lib/tick_tock/card.rb', line 24

def with(subject: nil, parent_card: nil, time_in: nil, time_out: nil)
end