Class: AdLint::Cc1::ValueTransition

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/adlint/cc1/value.rb

Instance Method Summary collapse

Constructor Details

#initialize(mval) ⇒ ValueTransition

Returns a new instance of ValueTransition.



1973
1974
1975
# File 'lib/adlint/cc1/value.rb', line 1973

def initialize(mval)
  @ordered_snapshots = create_ordered_snapshots(mval)
end

Instance Method Details

#each(&block) ⇒ Object



1985
1986
1987
1988
1989
1990
1991
# File 'lib/adlint/cc1/value.rb', line 1985

def each(&block)
  if block_given?
    @ordered_snapshots.each(&block)
  else
    to_enum(:each)
  end
end

#firstObject



1977
1978
1979
# File 'lib/adlint/cc1/value.rb', line 1977

def first
  @ordered_snapshots.first
end

#lastObject



1981
1982
1983
# File 'lib/adlint/cc1/value.rb', line 1981

def last
  @ordered_snapshots.last
end