Class: Lerna::State
- Inherits:
-
Object
- Object
- Lerna::State
- Defined in:
- lib/lerna/state.rb
Instance Attribute Summary collapse
-
#displays ⇒ Object
readonly
Returns the value of attribute displays.
Instance Method Summary collapse
- #changed? ⇒ Boolean
-
#initialize(enumerator = DisplayEnumerator.new) ⇒ State
constructor
A new instance of State.
- #scan! ⇒ Object
Constructor Details
#initialize(enumerator = DisplayEnumerator.new) ⇒ State
Returns a new instance of State.
5 6 7 |
# File 'lib/lerna/state.rb', line 5 def initialize(enumerator = DisplayEnumerator.new) @enumerator = enumerator end |
Instance Attribute Details
#displays ⇒ Object (readonly)
Returns the value of attribute displays.
9 10 11 |
# File 'lib/lerna/state.rb', line 9 def displays @displays end |
Instance Method Details
#changed? ⇒ Boolean
16 17 18 |
# File 'lib/lerna/state.rb', line 16 def changed? @displays != @previous_displays end |
#scan! ⇒ Object
11 12 13 14 |
# File 'lib/lerna/state.rb', line 11 def scan! @previous_displays = @displays @displays = @enumerator.call end |