Class: Antelope::DSL::Contexts::Terminal
- Defined in:
- lib/antelope/dsl/contexts/terminal.rb
Instance Attribute Summary collapse
-
#terminals ⇒ Object
(also: #data)
readonly
private
Returns the value of attribute terminals.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Antelope::DSL::Contexts::Base
Instance Attribute Details
#terminals ⇒ Object (readonly, private) Also known as: data
Returns the value of attribute terminals.
19 20 21 |
# File 'lib/antelope/dsl/contexts/terminal.rb', line 19 def terminals @terminals end |
Instance Method Details
#before_call ⇒ Object (private)
22 23 24 |
# File 'lib/antelope/dsl/contexts/terminal.rb', line 22 def before_call @terminals = {} end |
#terminal(map, value = true) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/antelope/dsl/contexts/terminal.rb', line 5 def terminal(map, value = true) case map when Hash @terminals.merge!(map) when Symbol, String @terminals[map] = value else raise ArgumentError, "Unexpected #{map.class}, expected " \ "Hash or Symbol" end end |