Class: Ellipses::Server::Meta::Symbol
- Inherits:
-
Struct
- Object
- Struct
- Ellipses::Server::Meta::Symbol
- Defined in:
- lib/ellipses/server/meta.rb
Instance Attribute Summary collapse
-
#depends ⇒ Object
Returns the value of attribute depends.
-
#description ⇒ Object
Returns the value of attribute description.
-
#path ⇒ Object
Returns the value of attribute path.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#depends ⇒ Object
Returns the value of attribute depends
18 19 20 |
# File 'lib/ellipses/server/meta.rb', line 18 def depends @depends end |
#description ⇒ Object
Returns the value of attribute description
18 19 20 |
# File 'lib/ellipses/server/meta.rb', line 18 def description @description end |
#path ⇒ Object
Returns the value of attribute path
18 19 20 |
# File 'lib/ellipses/server/meta.rb', line 18 def path @path end |
#symbol ⇒ Object
Returns the value of attribute symbol
18 19 20 |
# File 'lib/ellipses/server/meta.rb', line 18 def symbol @symbol end |
Class Method Details
.from_hash(hash) ⇒ Object
30 31 32 |
# File 'lib/ellipses/server/meta.rb', line 30 def self.from_hash(hash) from_hash_without_bogus_keys!(hash, error: Error) end |
.from_hash_with_depends(hash, *depends) ⇒ Object
34 35 36 |
# File 'lib/ellipses/server/meta.rb', line 34 def self.from_hash_with_depends(hash, *depends) from_hash_without_bogus_keys!(hash, error: Error).tap { |symbol| symbol.add_depends(*depends) } end |
Instance Method Details
#add_depends(*depends) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/ellipses/server/meta.rb', line 23 def add_depends(*depends) return if depends&.empty? self.depends ||= [] depends.reverse_each { |member| self.depends.unshift(member) } end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/ellipses/server/meta.rb', line 19 def to_s symbol end |