Sha256: f7eb08f17f96cfe5c1930549e0fc995cf7b4451382a70ab271994e996e10ee40

Contents?: true

Size: 471 Bytes

Versions: 10

Compression:

Stored size: 471 Bytes

Contents

# -*- encoding : utf-8 -*-
module LoyalCore
  module ActiveModel
    module HumanDisplayAble
      def self.included base
        base.class_eval do
          extend ClassMethods
          include InstanceMethods
        end
      end

      module ClassMethods
        def human_name
          self.model_name.human
        end
      end

      module InstanceMethods
        def class_human_name
          self.class.human_name
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
loyal_core-0.0.11 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.10 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.8 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.7 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.6 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.5 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.4 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.3 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.2 lib/loyal_core/active_model/human_display_able.rb
loyal_core-0.0.1 lib/loyal_core/active_model/human_display_able.rb