Class: Twitter::Meta

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/twitter/lib/twitter/meta.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_dir) ⇒ Meta

Initializer for Twitter::Meta class. Takes root_dir as parameter.



12
13
14
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 12

def initialize(root_dir)
  @root_dir = root_dir
end

Instance Attribute Details

#gem_specObject (readonly)

Returns RubyGem specification for Twitter4R project



42
43
44
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 42

def gem_spec
  @gem_spec
end

#project_filesObject (readonly)

Returns list of project files



30
31
32
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 30

def project_files
  @project_files
end

#root_dirObject

Returns the value of attribute root_dir.



8
9
10
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 8

def root_dir
  @root_dir
end

#spec_filesObject (readonly)

Returns list of specification files



36
37
38
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 36

def spec_files
  @spec_files
end

Instance Method Details

#pkg_infoObject

Returns package information defined in root_dir/pkg-info.yml



17
18
19
20
21
22
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 17

def pkg_info
  yaml_file = File.join(@root_dir, 'pkg-info.yml')
  ryaml = ERB.new(File.read(yaml_file), 0)
  s = ryaml.result(binding)
  YAML.load(s)
end

#spec_infoObject

Returns RubyGems spec information



25
26
27
# File 'lib/vendor/twitter/lib/twitter/meta.rb', line 25

def spec_info
  self.pkg_info['spec'] if self.pkg_info
end