Class: Rasti::App::Facade::InteractionSpecification
- Inherits:
-
Object
- Object
- Rasti::App::Facade::InteractionSpecification
- Defined in:
- lib/rasti/app/facade.rb
Instance Attribute Summary collapse
-
#interaction ⇒ Object
readonly
Returns the value of attribute interaction.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
- #asynchronic? ⇒ Boolean
- #form_attributes ⇒ Object
-
#initialize(interaction, namespace) ⇒ InteractionSpecification
constructor
A new instance of InteractionSpecification.
- #name ⇒ Object
- #permission ⇒ Object
- #synchronic? ⇒ Boolean
Constructor Details
#initialize(interaction, namespace) ⇒ InteractionSpecification
Returns a new instance of InteractionSpecification.
16 17 18 19 |
# File 'lib/rasti/app/facade.rb', line 16 def initialize(interaction, namespace) @interaction = interaction @namespace = namespace end |
Instance Attribute Details
#interaction ⇒ Object (readonly)
Returns the value of attribute interaction.
14 15 16 |
# File 'lib/rasti/app/facade.rb', line 14 def interaction @interaction end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
14 15 16 |
# File 'lib/rasti/app/facade.rb', line 14 def namespace @namespace end |
Instance Method Details
#asynchronic? ⇒ Boolean
29 30 31 |
# File 'lib/rasti/app/facade.rb', line 29 def asynchronic? interaction.asynchronic? end |
#form_attributes ⇒ Object
37 38 39 |
# File 'lib/rasti/app/facade.rb', line 37 def form_attributes interaction.const_defined?(:Form) ? interaction.const_get(:Form).attributes : [] end |
#name ⇒ Object
21 22 23 |
# File 'lib/rasti/app/facade.rb', line 21 def name .last_section.to_sym end |
#permission ⇒ Object
25 26 27 |
# File 'lib/rasti/app/facade.rb', line 25 def @permission ||= Permission.new interaction.name.sub("#{namespace.name}::", '').split('::').map { |s| Inflecto.underscore s } end |
#synchronic? ⇒ Boolean
33 34 35 |
# File 'lib/rasti/app/facade.rb', line 33 def synchronic? !asynchronic? end |