Class: Twitter::Meta
- Inherits:
-
Object
- Object
- Twitter::Meta
- Defined in:
- lib/vendor/twitter/lib/twitter/meta.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#gem_spec ⇒ Object
readonly
Returns RubyGem specification for Twitter4R project.
-
#project_files ⇒ Object
readonly
Returns list of project files.
-
#root_dir ⇒ Object
Returns the value of attribute root_dir.
-
#spec_files ⇒ Object
readonly
Returns list of specification files.
Instance Method Summary collapse
-
#initialize(root_dir) ⇒ Meta
constructor
Initializer for Twitter::Meta class.
-
#pkg_info ⇒ Object
Returns package information defined in
root_dir
/pkg-info.yml. -
#spec_info ⇒ Object
Returns RubyGems spec information.
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_spec ⇒ Object (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_files ⇒ Object (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_dir ⇒ Object
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_files ⇒ Object (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_info ⇒ Object
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_info ⇒ Object
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 |