Class: Spikard::Introspection::Binding
- Inherits:
-
Object
- Object
- Spikard::Introspection::Binding
- Defined in:
- lib/spikard/introspection.rb
Overview
Resolved binding for a single non-body handler parameter.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#param_default ⇒ Object
readonly
Returns the value of attribute param_default.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target_type ⇒ Object
readonly
Returns the value of attribute target_type.
Instance Method Summary collapse
- #has_plain_default? ⇒ Boolean
-
#initialize(name, source, target_type, param_default) ⇒ Binding
constructor
A new instance of Binding.
Constructor Details
#initialize(name, source, target_type, param_default) ⇒ Binding
Returns a new instance of Binding.
17 18 19 20 21 22 |
# File 'lib/spikard/introspection.rb', line 17 def initialize(name, source, target_type, param_default) @name = name @source = source @target_type = target_type @param_default = param_default end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/spikard/introspection.rb', line 15 def name @name end |
#param_default ⇒ Object (readonly)
Returns the value of attribute param_default.
15 16 17 |
# File 'lib/spikard/introspection.rb', line 15 def param_default @param_default end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
15 16 17 |
# File 'lib/spikard/introspection.rb', line 15 def source @source end |
#target_type ⇒ Object (readonly)
Returns the value of attribute target_type.
15 16 17 |
# File 'lib/spikard/introspection.rb', line 15 def target_type @target_type end |
Instance Method Details
#has_plain_default? ⇒ Boolean
24 25 26 |
# File 'lib/spikard/introspection.rb', line 24 def has_plain_default? @param_default && !@param_default.is_a?(ParamBase) end |