Class: Fig::Package::Publish

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Statement

#urls, #walk_statements

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_nameObject (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_nameObject (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