Class: Releaf::ControllerGroupDefinition

Inherits:
Object
  • Object
show all
Defined in:
app/lib/releaf/controller_group_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ControllerGroupDefinition

Returns a new instance of ControllerGroupDefinition.



4
5
6
7
# File 'app/lib/releaf/controller_group_definition.rb', line 4

def initialize(options)
  self.name = options[:name]
  self.controllers = options[:items].map{|option| Releaf::ControllerDefinition.new(option) }
end

Instance Attribute Details

#controllersObject

Returns the value of attribute controllers.



2
3
4
# File 'app/lib/releaf/controller_group_definition.rb', line 2

def controllers
  @controllers
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'app/lib/releaf/controller_group_definition.rb', line 2

def name
  @name
end

Instance Method Details

#group?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/lib/releaf/controller_group_definition.rb', line 13

def group?
  true
end

#localized_nameObject



9
10
11
# File 'app/lib/releaf/controller_group_definition.rb', line 9

def localized_name
  I18n.t(name, scope: "admin.controllers")
end