Class: Phlexi::Display::Builder
- Inherits:
-
Field::Builder
- Object
- Field::Builder
- Phlexi::Display::Builder
- Includes:
- Options::InferredTypes
- Defined in:
- lib/phlexi/display/builder.rb
Overview
Builder class is responsible for building display fields with various options and components.
Direct Known Subclasses
Instance Method Summary collapse
-
#association_tag ⇒ Components::Association
Creates an association display tag for the field.
-
#color_tag ⇒ Components::Color
Creates a color display tag for the field.
- #date_tag ⇒ Object
-
#datetime_tag ⇒ Components::DateTime
Creates a datetime display for the field.
-
#description_tag ⇒ Components::Description
Creates a Description tag for the field.
-
#email_tag ⇒ Components::Email
Creates a email display tag for the field.
-
#enum_tag ⇒ Components::Enum
Creates a enum display tag for the field.
- #hstore_tag ⇒ Object
- #integer_tag ⇒ Object
- #json_tag ⇒ Object
-
#label_tag ⇒ Components::Label
Creates a label tag for the field.
-
#number_tag ⇒ Components::Number
Creates a number display tag for the field.
-
#password_tag ⇒ Components::Password
Creates a password display tag for the field.
-
#phone_tag ⇒ Components::Email
Creates a email display tag for the field.
-
#placeholder_tag ⇒ Components::Placeholder
Creates a Placeholder tag for the field.
-
#string_tag ⇒ Components::String
(also: #search_tag)
Creates a string display tag for the field.
- #text_tag ⇒ Object
- #time_tag ⇒ Object
-
#url_tag ⇒ Components::Url
Creates a url display tag for the field.
-
#wrapped {|block| ... } ⇒ Components::Wrapper
Wraps the field with additional markup.
Instance Method Details
#association_tag ⇒ Components::Association
Creates an association display tag for the field.
144 145 146 |
# File 'lib/phlexi/display/builder.rb', line 144 def association_tag(**, &) create_component(Components::Association, :association, **, &) end |
#color_tag ⇒ Components::Color
Creates a color display tag for the field.
96 97 98 |
# File 'lib/phlexi/display/builder.rb', line 96 def color_tag(**, &) create_component(Components::Color, :color, **, &) end |
#date_tag ⇒ Object
76 77 78 |
# File 'lib/phlexi/display/builder.rb', line 76 def date_tag(**, &) create_component(Components::DateTime, :date, **, &) end |
#datetime_tag ⇒ Components::DateTime
Creates a datetime display for the field.
72 73 74 |
# File 'lib/phlexi/display/builder.rb', line 72 def datetime_tag(**, &) create_component(Components::DateTime, :datetime, **, &) end |
#description_tag ⇒ Components::Description
Creates a Description tag for the field.
31 32 33 |
# File 'lib/phlexi/display/builder.rb', line 31 def description_tag(**, &) create_component(Components::Description, :description, **, &) end |
#email_tag ⇒ Components::Email
Creates a email display tag for the field.
120 121 122 |
# File 'lib/phlexi/display/builder.rb', line 120 def email_tag(**, &) create_component(Components::Email, :email, **, &) end |
#enum_tag ⇒ Components::Enum
Creates a enum display tag for the field.
112 113 114 |
# File 'lib/phlexi/display/builder.rb', line 112 def enum_tag(**, &) create_component(Components::Enum, :enum, **, &) end |
#hstore_tag ⇒ Object
64 65 66 |
# File 'lib/phlexi/display/builder.rb', line 64 def hstore_tag(**, &) create_component(Components::JSON, :hstore, **, &) end |
#integer_tag ⇒ Object
56 57 58 |
# File 'lib/phlexi/display/builder.rb', line 56 def integer_tag(**, &) create_component(Components::Integer, :integer, **, &) end |
#json_tag ⇒ Object
60 61 62 |
# File 'lib/phlexi/display/builder.rb', line 60 def json_tag(**, &) create_component(Components::JSON, :json, **, &) end |
#label_tag ⇒ Components::Label
Creates a label tag for the field.
15 16 17 |
# File 'lib/phlexi/display/builder.rb', line 15 def label_tag(**, &) create_component(Components::Label, :label, **, &) end |
#number_tag ⇒ Components::Number
Creates a number display tag for the field.
52 53 54 |
# File 'lib/phlexi/display/builder.rb', line 52 def number_tag(**, &) create_component(Components::Number, :number, **, &) end |
#password_tag ⇒ Components::Password
Creates a password display tag for the field.
104 105 106 |
# File 'lib/phlexi/display/builder.rb', line 104 def password_tag(**, &) create_component(Components::Password, :password, **, &) end |
#phone_tag ⇒ Components::Email
Creates a email display tag for the field.
128 129 130 |
# File 'lib/phlexi/display/builder.rb', line 128 def phone_tag(**, &) create_component(Components::Phone, :phone, **, &) end |
#placeholder_tag ⇒ Components::Placeholder
Creates a Placeholder tag for the field.
23 24 25 |
# File 'lib/phlexi/display/builder.rb', line 23 def placeholder_tag(**, &) create_component(Components::Placeholder, :placeholder, **, &) end |
#string_tag ⇒ Components::String Also known as: search_tag
Creates a string display tag for the field.
39 40 41 |
# File 'lib/phlexi/display/builder.rb', line 39 def string_tag(**, &) create_component(Components::String, :string, **, &) end |
#text_tag ⇒ Object
44 45 46 |
# File 'lib/phlexi/display/builder.rb', line 44 def text_tag(**, &) create_component(Components::String, :text, **, &) end |
#time_tag ⇒ Object
80 81 82 |
# File 'lib/phlexi/display/builder.rb', line 80 def time_tag(**, &) create_component(Components::Time, :time, **, &) end |
#url_tag ⇒ Components::Url
Creates a url display tag for the field.
136 137 138 |
# File 'lib/phlexi/display/builder.rb', line 136 def url_tag(**, &) create_component(Components::Url, :url, **, &) end |
#wrapped {|block| ... } ⇒ Components::Wrapper
Wraps the field with additional markup.
161 162 163 |
# File 'lib/phlexi/display/builder.rb', line 161 def wrapped(**, &) create_component(Components::Wrapper, :wrapper, **, &) end |