Class: StructureType
- Inherits:
-
Sunrise::Models::StructureType
- Object
- Sunrise::Models::StructureType
- StructureType
- Defined in:
- app/models/defaults/structure_type.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, pageable = true) ⇒ StructureType
constructor
A new instance of StructureType.
- #pageable? ⇒ Boolean
Constructor Details
#initialize(code, pageable = true) ⇒ StructureType
Returns a new instance of StructureType.
4 5 6 7 |
# File 'app/models/defaults/structure_type.rb', line 4 def initialize(code, pageable = true) @pageable = pageable super code end |
Class Method Details
.pageable ⇒ Object
14 15 16 |
# File 'app/models/defaults/structure_type.rb', line 14 def pageable all.select(&:pageable?) end |
.pageable_ids ⇒ Object
18 19 20 |
# File 'app/models/defaults/structure_type.rb', line 18 def pageable_ids pageable.map(&:id) end |
Instance Method Details
#pageable? ⇒ Boolean
9 10 11 |
# File 'app/models/defaults/structure_type.rb', line 9 def pageable? @pageable end |