Class: RIM::ModuleInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/rim/module_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(remote_url, local_path, target_revision, ignores = nil, remote_branch_format = nil) ⇒ ModuleInfo

Returns a new instance of ModuleInfo.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rim/module_info.rb', line 15

def initialize(remote_url, local_path, target_revision, ignores = nil, remote_branch_format = nil)
  @remote_url = remote_url
  @remote_branch_format = remote_branch_format
  @local_path = local_path
  @target_revision = target_revision
  if ignores.is_a?(String)
    @ignores = ignores.split(",").each do |s| 
      s.strip! 
    end 
  else
    @ignores = ignores || []
  end
end

Instance Attribute Details

#ignoresObject (readonly)

ignores



13
14
15
# File 'lib/rim/module_info.rb', line 13

def ignores
  @ignores
end

#local_pathObject (readonly)

locale module path



9
10
11
# File 'lib/rim/module_info.rb', line 9

def local_path
  @local_path
end

#remote_branch_formatObject (readonly)

remote branch format



7
8
9
# File 'lib/rim/module_info.rb', line 7

def remote_branch_format
  @remote_branch_format
end

#remote_urlObject (readonly)

remote url (unique identifier of module)



5
6
7
# File 'lib/rim/module_info.rb', line 5

def remote_url
  @remote_url
end

#target_revisionObject (readonly)

target revision



11
12
13
# File 'lib/rim/module_info.rb', line 11

def target_revision
  @target_revision
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/rim/module_info.rb', line 29

def valid?
  return @remote_url && @local_path && @target_revision
end