Class: WidgetPosition

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/sunrise/widgets/templates/widget_position.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ WidgetPosition

Returns a new instance of WidgetPosition.



2
3
4
# File 'lib/generators/sunrise/widgets/templates/widget_position.rb', line 2

def initialize(value)
  @code = value.to_s
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/generators/sunrise/widgets/templates/widget_position.rb', line 5

def code
  @code
end

Instance Method Details

#titleObject



7
8
9
# File 'lib/generators/sunrise/widgets/templates/widget_position.rb', line 7

def title
  I18n.t(@code, :scope => [:widgets, :position, :title])
end