Class: EasyEntityFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(view_context) ⇒ EasyEntityFormatter

Returns a new instance of EasyEntityFormatter.



3
4
5
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 3

def initialize(view_context)
  @view_context = view_context
end

Instance Method Details

#ending_buttons?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 23

def ending_buttons?
  false
end

#format_column(column, entity) ⇒ Object



15
16
17
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 15

def format_column(column, entity)
  format_object column.value_object(entity)
end

#format_object(value) ⇒ Object



19
20
21
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 19

def format_object(value)
  view.format_object(value)
end

#l(*args) ⇒ Object



11
12
13
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 11

def l(*args)
  view.l(*args)
end

#viewObject



7
8
9
# File 'lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb', line 7

def view
  @view_context
end