Class: FirstClassCollections
- Inherits:
-
Object
- Object
- FirstClassCollections
- Defined in:
- lib/rules/first_class_collections.rb
Instance Method Summary collapse
-
#initialize(max) ⇒ FirstClassCollections
constructor
A new instance of FirstClassCollections.
- #message ⇒ Object
- #valid?(code) ⇒ Boolean
Constructor Details
#initialize(max) ⇒ FirstClassCollections
Returns a new instance of FirstClassCollections.
2 3 4 |
# File 'lib/rules/first_class_collections.rb', line 2 def initialize(max) @max = max end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/rules/first_class_collections.rb', line 10 def "more than 1 collection member variable" end |
#valid?(code) ⇒ Boolean
6 7 8 |
# File 'lib/rules/first_class_collections.rb', line 6 def valid?(code) ClassStructure.new(code).collection_count <= 1 end |