Class: Lanes::Screens::Group

Inherits:
Object
  • Object
show all
Includes:
Concerns::AttrAccessorWithDefault
Defined in:
lib/lanes/screens.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sprockets) ⇒ Group

Returns a new instance of Group.



29
30
31
# File 'lib/lanes/screens.rb', line 29

def initialize(sprockets)
    @sprockets=sprockets
end

Class Method Details

.each(config) ⇒ Object



25
26
27
# File 'lib/lanes/screens.rb', line 25

def self.each(config)
    self.descendants.each{ |klass| yield klass.new(config) }
end

Instance Method Details

#to_jsonObject



33
34
35
36
37
38
39
40
# File 'lib/lanes/screens.rb', line 33

def to_json
    Oj.dump({
        id: identifier,
        title: title,
        description: description,
        icon: icon
    }, mode: :compat)
end