Class: Bhf::Platform::Attribute::Abstract
- Inherits:
-
Object
- Object
- Bhf::Platform::Attribute::Abstract
- Defined in:
- lib/bhf/platform/attribute/abstract.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #db_name ⇒ Object
- #display_type ⇒ Object
- #form_type ⇒ Object
-
#initialize(options) ⇒ Abstract
constructor
A new instance of Abstract.
- #link ⇒ Object
- #macro ⇒ Object
- #reflection ⇒ Object
- #reorderble ⇒ Object
- #show_type ⇒ Object
- #type_ignore_emtpy? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Abstract
Returns a new instance of Abstract.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 6 def initialize() @name = [:name] @title = [:title] @info = [:info] @options_form_type = [:form_type].to_sym if [:form_type] @options_display_type = [:display_type].to_sym if [:display_type] @options_show_type = [:show_type].to_sym if [:show_type] @link_platform_settings = [:link] unless [:link].blank? end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
4 5 6 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 4 def info @info end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 4 def name @name end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 4 def title @title end |
Instance Method Details
#db_name ⇒ Object
47 48 49 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 47 def db_name name end |
#display_type ⇒ Object
26 27 28 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 26 def display_type @options_display_type || @name end |
#form_type ⇒ Object
22 23 24 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 22 def form_type @options_form_type || @name end |
#link ⇒ Object
38 39 40 41 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 38 def link return unless @link_platform_settings @link ||= Bhf::Platform::Base.new(@link_platform_settings) end |
#macro ⇒ Object
18 19 20 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 18 def macro :column end |
#reflection ⇒ Object
43 44 45 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 43 def reflection false end |
#reorderble ⇒ Object
51 52 53 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 51 def reorderble false end |
#show_type ⇒ Object
34 35 36 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 34 def show_type @options_show_type || display_type || @name end |
#type_ignore_emtpy? ⇒ Boolean
30 31 32 |
# File 'lib/bhf/platform/attribute/abstract.rb', line 30 def type_ignore_emtpy? false end |