Class: Temporal::Set

Inherits:
Object show all
Defined in:
lib/temporals/types.rb

Direct Known Subclasses

Union

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Set

Returns a new instance of Set.



94
95
96
97
# File 'lib/temporals/types.rb', line 94

def initialize(*args)
  # @set = args.select {|e| e.is_a?(Temporal) || e.is_a?(Range)}
  @set = args.select {|e| e.is_a?(Temporal)}
end

Instance Method Details

#[](key) ⇒ Object



90
91
92
# File 'lib/temporals/types.rb', line 90

def [](key)
  instance_variable_get(:"@#{key}")
end

#setObject



86
87
88
# File 'lib/temporals/types.rb', line 86

def set
  @set ||= []
end