Class: Apiwork::Introspection::Param::Literal
- Defined in:
- lib/apiwork/introspection/param/literal.rb
Overview
Literal param representing a constant value.
Instance Method Summary collapse
-
#literal? ⇒ Boolean
Whether this param is a literal.
-
#to_h ⇒ Hash
Converts this param to a hash.
-
#value ⇒ String, ...
The value for this param.
Methods inherited from Base
#array?, #binary?, #boolean?, #boundable?, #concrete?, #date?, #datetime?, #decimal?, #default?, #deprecated?, #description, #enum?, #enum_reference?, #formattable?, #initialize, #integer?, #nullable?, #number?, #numeric?, #object?, #optional?, #partial?, #record?, #reference?, #scalar?, #string?, #tag, #time?, #type, #union?, #unknown?, #uuid?
Constructor Details
This class inherits a constructor from Apiwork::Introspection::Param::Base
Instance Method Details
#literal? ⇒ Boolean
Whether this param is a literal.
29 30 31 |
# File 'lib/apiwork/introspection/param/literal.rb', line 29 def literal? true end |
#to_h ⇒ Hash
Converts this param to a hash.
37 38 39 40 41 |
# File 'lib/apiwork/introspection/param/literal.rb', line 37 def to_h result = super result[:value] = value result end |
#value ⇒ String, ...
The value for this param.
21 22 23 |
# File 'lib/apiwork/introspection/param/literal.rb', line 21 def value @dump[:value] end |