Class: Fig::Package::Publish
- Inherits:
-
Object
- Object
- Fig::Package::Publish
- Includes:
- Statement
- Defined in:
- lib/fig/package/publish.rb
Overview
Artificial statement (it’s not in the grammar) used to handle default publishing.
Instance Attribute Summary collapse
-
#local_name ⇒ Object
readonly
Returns the value of attribute local_name.
-
#remote_name ⇒ Object
readonly
Returns the value of attribute remote_name.
Instance Method Summary collapse
-
#initialize(local_name, remote_name) ⇒ Publish
constructor
A new instance of Publish.
- #unparse(indent) ⇒ Object
Methods included from Statement
Constructor Details
#initialize(local_name, remote_name) ⇒ Publish
Returns a new instance of Publish.
15 16 17 18 |
# File 'lib/fig/package/publish.rb', line 15 def initialize(local_name, remote_name) @local_name = local_name @remote_name = remote_name end |
Instance Attribute Details
#local_name ⇒ Object (readonly)
Returns the value of attribute local_name.
13 14 15 |
# File 'lib/fig/package/publish.rb', line 13 def local_name @local_name end |
#remote_name ⇒ Object (readonly)
Returns the value of attribute remote_name.
13 14 15 |
# File 'lib/fig/package/publish.rb', line 13 def remote_name @remote_name end |
Instance Method Details
#unparse(indent) ⇒ Object
20 21 22 |
# File 'lib/fig/package/publish.rb', line 20 def unparse(indent) "#{indent}publish #{@local_name}->#{@remote_name}" end |