Class: KDL::Types::Email
- Inherits:
-
Value::Custom
- Object
- Value
- Value::Custom
- KDL::Types::Email
- Defined in:
- lib/kdl/types/email.rb,
lib/kdl/types/email/parser.rb
Direct Known Subclasses
Defined Under Namespace
Constant Summary
Constants inherited from Value
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
Attributes inherited from Value::Custom
Attributes inherited from Value
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value, local:, domain:, **kwargs) ⇒ Email
constructor
A new instance of Email.
Methods inherited from Value::Custom
Methods inherited from Value
#==, #as_type, from, #inspect, #method_missing, #respond_to_missing?, #stringify_value, #to_s, #to_v2, #version
Constructor Details
#initialize(value, local:, domain:, **kwargs) ⇒ Email
Returns a new instance of Email.
10 11 12 13 14 |
# File 'lib/kdl/types/email.rb', line 10 def initialize(value, local:, domain:, **kwargs) super(value, **kwargs) @local = local @domain = domain end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class KDL::Value
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
8 9 10 |
# File 'lib/kdl/types/email.rb', line 8 def domain @domain end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
8 9 10 |
# File 'lib/kdl/types/email.rb', line 8 def local @local end |