Class: CanTango::Permit::Attribute

Inherits:
Base
  • Object
show all
Extended by:
ClassMethods
Includes:
TestAttribute
Defined in:
lib/cantango/permit/attribute.rb

Defined Under Namespace

Modules: ClassMethods, TestAttribute Classes: Builder

Instance Attribute Summary

Attributes inherited from Base

#ability, #disabled, #mode

Instance Method Summary collapse

Methods included from ClassMethods

attribute_name, inherited

Methods included from TestAttribute

#plural_attribute, #test_plural, #test_single, #valid?

Methods inherited from Base

#any, #category, #disable!, #disabled?, #initialize, #modes, #name, #permit_type, #sync_rules!, #valid?

Methods included from ClassMethods

#finder, #hash_key, #inherited, #modes, #type

Methods included from Helper::Naming

#account_name, #permit_type

Constructor Details

This class inherits a constructor from CanTango::Permit::Base

Instance Method Details

#attribute(name = nil) ⇒ Object



50
51
52
# File 'lib/cantango/permit/attribute.rb', line 50

def attribute name = nil
  self.class.attribute
end

#permit_nameObject



46
47
48
# File 'lib/cantango/permit/attribute.rb', line 46

def permit_name
  self.class.attribute_name
end