Class: Zae::Translate
- Inherits:
-
Object
- Object
- Zae::Translate
- Defined in:
- lib/zae/translate.rb
Overview
translate action to final command
Instance Method Summary collapse
-
#initialize(action, arguments = []) ⇒ Translate
constructor
A new instance of Translate.
-
#to_s ⇒ Object
simple string representation.
Constructor Details
#initialize(action, arguments = []) ⇒ Translate
Returns a new instance of Translate.
19 20 21 22 23 24 |
# File 'lib/zae/translate.rb', line 19 def initialize(action, arguments = []) @action = action @arguments = arguments @configuration = Parse.new.found @permission = Permission.new(action, @configuration) end |
Instance Method Details
#to_s ⇒ Object
simple string representation
27 28 29 30 |
# File 'lib/zae/translate.rb', line 27 def to_s command = @permission.super? ? @configuration[:super][@action] : @configuration[:user][@action] compose command end |