Class: SleepingKingStudios::Tools::Toolbelt
- Inherits:
- BasicObject
- Defined in:
- lib/sleeping_king_studios/tools/toolbelt.rb
Overview
Helper object for quick access to all available tools.
Instance Attribute Summary collapse
-
#array_tools ⇒ Object
(also: #ary)
readonly
Returns the value of attribute array_tools.
-
#core_tools ⇒ Object
readonly
Returns the value of attribute core_tools.
-
#hash_tools ⇒ Object
(also: #hsh)
readonly
Returns the value of attribute hash_tools.
-
#integer_tools ⇒ Object
(also: #int)
readonly
Returns the value of attribute integer_tools.
-
#object_tools ⇒ Object
(also: #obj)
readonly
Returns the value of attribute object_tools.
-
#string_tools ⇒ Object
(also: #str)
readonly
Returns the value of attribute string_tools.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(deprecation_strategy: nil, inflector: nil) ⇒ Toolbelt
constructor
A new instance of Toolbelt.
- #inspect ⇒ Object (also: #to_s)
Constructor Details
#initialize(deprecation_strategy: nil, inflector: nil) ⇒ Toolbelt
Returns a new instance of Toolbelt.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 12 def initialize(deprecation_strategy: nil, inflector: nil) @array_tools = ::SleepingKingStudios::Tools::ArrayTools.new @core_tools = ::SleepingKingStudios::Tools::CoreTools.new( deprecation_strategy: deprecation_strategy ) @hash_tools = ::SleepingKingStudios::Tools::HashTools.new @integer_tools = ::SleepingKingStudios::Tools::IntegerTools.new @object_tools = ::SleepingKingStudios::Tools::ObjectTools.new @string_tools = ::SleepingKingStudios::Tools::StringTools.new(inflector: inflector) end |
Instance Attribute Details
#array_tools ⇒ Object (readonly) Also known as: ary
Returns the value of attribute array_tools.
24 25 26 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 24 def array_tools @array_tools end |
#core_tools ⇒ Object (readonly)
Returns the value of attribute core_tools.
26 27 28 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 26 def core_tools @core_tools end |
#hash_tools ⇒ Object (readonly) Also known as: hsh
Returns the value of attribute hash_tools.
28 29 30 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 28 def hash_tools @hash_tools end |
#integer_tools ⇒ Object (readonly) Also known as: int
Returns the value of attribute integer_tools.
30 31 32 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 30 def integer_tools @integer_tools end |
#object_tools ⇒ Object (readonly) Also known as: obj
Returns the value of attribute object_tools.
32 33 34 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 32 def object_tools @object_tools end |
#string_tools ⇒ Object (readonly) Also known as: str
Returns the value of attribute string_tools.
34 35 36 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 34 def string_tools @string_tools end |
Class Method Details
.instance ⇒ Object
8 9 10 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 8 def self.instance @instance ||= new end |
Instance Method Details
#inspect ⇒ Object Also known as: to_s
53 54 55 |
# File 'lib/sleeping_king_studios/tools/toolbelt.rb', line 53 def inspect "#<#{::Object.instance_method(:class).bind(self).call.name}>" end |