Class: XDry::IdVarType
- Defined in:
- lib/xdry/parsing/parts/var_types.rb
Instance Attribute Summary collapse
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
Instance Method Summary collapse
- #default_property_retainment_policy ⇒ Object
-
#initialize(protocol = nil) ⇒ IdVarType
constructor
A new instance of IdVarType.
- #to_s ⇒ Object
Methods inherited from VarType
#needs_space?, parse, #to_source_with_space
Constructor Details
#initialize(protocol = nil) ⇒ IdVarType
Returns a new instance of IdVarType.
36 37 38 |
# File 'lib/xdry/parsing/parts/var_types.rb', line 36 def initialize protocol=nil @protocol = protocol end |
Instance Attribute Details
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
34 35 36 |
# File 'lib/xdry/parsing/parts/var_types.rb', line 34 def protocol @protocol end |
Instance Method Details
#default_property_retainment_policy ⇒ Object
48 |
# File 'lib/xdry/parsing/parts/var_types.rb', line 48 def default_property_retainment_policy; 'assign'; end |
#to_s ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/xdry/parsing/parts/var_types.rb', line 40 def to_s if @protocol.nil? "id" else "id<#{@protocol}>" end end |