Class: ConstStricter::ParsedConst
- Inherits:
-
Struct
- Object
- Struct
- ConstStricter::ParsedConst
- Defined in:
- lib/const_stricter/parsed_const.rb,
lib/const_stricter/parsed_const.rb
Instance Attribute Summary collapse
-
#const_name ⇒ Object
Returns the value of attribute const_name.
-
#dynamic ⇒ Object
Returns the value of attribute dynamic.
-
#location ⇒ Object
Returns the value of attribute location.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
-
#initialize(namespace:, const_name:) ⇒ ParsedConst
constructor
A new instance of ParsedConst.
- #inspect ⇒ Object
Constructor Details
#initialize(namespace:, const_name:) ⇒ ParsedConst
Returns a new instance of ParsedConst.
10 11 12 13 14 |
# File 'lib/const_stricter/parsed_const.rb', line 10 def initialize(namespace:, const_name:) super self.namespace ||= DEFAULT_NAMESPACE end |
Instance Attribute Details
#const_name ⇒ Object
Returns the value of attribute const_name
2 3 4 |
# File 'lib/const_stricter/parsed_const.rb', line 2 def const_name @const_name end |
#dynamic ⇒ Object
Returns the value of attribute dynamic.
5 6 7 |
# File 'lib/const_stricter/parsed_const.rb', line 5 def dynamic @dynamic end |
#location ⇒ Object
Returns the value of attribute location.
5 6 7 |
# File 'lib/const_stricter/parsed_const.rb', line 5 def location @location end |
#namespace ⇒ Object
Returns the value of attribute namespace
2 3 4 |
# File 'lib/const_stricter/parsed_const.rb', line 2 def namespace @namespace end |
Instance Method Details
#inspect ⇒ Object
16 |
# File 'lib/const_stricter/parsed_const.rb', line 16 def inspect = "#{namespace} { #{const_name} } → #{location}" |