Class: Vop::EntityDefinition
- Inherits:
-
Object
- Object
- Vop::EntityDefinition
- Defined in:
- lib/vop/objects/entity_definition.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#on ⇒ Object
Returns the value of attribute on.
-
#plugin ⇒ Object
readonly
Returns the value of attribute plugin.
-
#show_options ⇒ Object
Returns the value of attribute show_options.
Instance Method Summary collapse
-
#initialize(plugin, name) ⇒ EntityDefinition
constructor
A new instance of EntityDefinition.
- #short_name ⇒ Object
- #source ⇒ Object
Constructor Details
#initialize(plugin, name) ⇒ EntityDefinition
Returns a new instance of EntityDefinition.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/vop/objects/entity_definition.rb', line 11 def initialize(plugin, name) @plugin = plugin @name = name @key = "name" @data = {} @block = lambda { |params| $logger.warn "entity #{name} does not have a run block" } @on = nil @show_options = {} end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
7 8 9 |
# File 'lib/vop/objects/entity_definition.rb', line 7 def block @block end |
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/vop/objects/entity_definition.rb', line 6 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/vop/objects/entity_definition.rb', line 5 def name @name end |
#on ⇒ Object
Returns the value of attribute on.
8 9 10 |
# File 'lib/vop/objects/entity_definition.rb', line 8 def on @on end |
#plugin ⇒ Object (readonly)
Returns the value of attribute plugin.
5 6 7 |
# File 'lib/vop/objects/entity_definition.rb', line 5 def plugin @plugin end |
#show_options ⇒ Object
Returns the value of attribute show_options.
9 10 11 |
# File 'lib/vop/objects/entity_definition.rb', line 9 def @show_options end |
Instance Method Details
#short_name ⇒ Object
23 24 25 |
# File 'lib/vop/objects/entity_definition.rb', line 23 def short_name @name.split(".").last end |
#source ⇒ Object
27 28 29 |
# File 'lib/vop/objects/entity_definition.rb', line 27 def source plugin.sources[:entities][name] end |