Class: Cohortly::TagConfig::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/cohortly/tag_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller_name, &block) ⇒ Controller

Returns a new instance of Controller.



83
84
85
86
87
# File 'lib/cohortly/tag_config.rb', line 83

def initialize(controller_name, &block)
  self._acts ||= []
  self._name = controller_name.to_sym
  self.instance_eval(&block)
end

Instance Attribute Details

#_actsObject

Returns the value of attribute _acts.



82
83
84
# File 'lib/cohortly/tag_config.rb', line 82

def _acts
  @_acts
end

#_nameObject

Returns the value of attribute _name.



82
83
84
# File 'lib/cohortly/tag_config.rb', line 82

def _name
  @_name
end

Instance Method Details

#actions(*act_names) ⇒ Object



89
90
91
# File 'lib/cohortly/tag_config.rb', line 89

def actions(*act_names)
  self._acts = act_names.collect &:to_sym
end