Class: Actions::Helpers::Humanizer::Resource

Inherits:
Object
  • Object
show all
Defined in:
app/lib/actions/helpers/humanizer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object



69
70
71
# File 'app/lib/actions/helpers/humanizer.rb', line 69

def self.inherited(klass)
  Humanizer.register_resource(klass)
end

Instance Method Details

#humanized_nameObject



57
58
59
# File 'app/lib/actions/helpers/humanizer.rb', line 57

def humanized_name
  name
end

#humanized_value(data) ⇒ Object



63
64
65
66
67
# File 'app/lib/actions/helpers/humanizer.rb', line 63

def humanized_value(data)
  fetch_data(data, name, :name) ||
    fetch_data(data, name, :label) ||
    fetch_data(data, name, :id)
end


61
# File 'app/lib/actions/helpers/humanizer.rb', line 61

def link(data); end

#nameObject

Raises:

  • (NotImplementedError)


53
54
55
# File 'app/lib/actions/helpers/humanizer.rb', line 53

def name
  raise NotImplementedError
end