Class: Hadupils::Extensions::Base
- Inherits:
-
Object
- Object
- Hadupils::Extensions::Base
- Defined in:
- lib/hadupils/extensions.rb
Instance Attribute Summary collapse
-
#assets ⇒ Object
readonly
Returns the value of attribute assets.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #hadoop_confs ⇒ Object
- #hivercs ⇒ Object
-
#initialize(directory, &block) ⇒ Base
constructor
A new instance of Base.
- #merge_assets(assets) ⇒ Object
Constructor Details
#initialize(directory, &block) ⇒ Base
Returns a new instance of Base.
236 237 238 239 240 241 242 |
# File 'lib/hadupils/extensions.rb', line 236 def initialize(directory, &block) if block_given? EvalProxy.new(self).instance_eval &block end @path = ::File.(directory) unless directory.nil? @assets = merge_assets(self.class.gather_assets(@path)) end |
Instance Attribute Details
#assets ⇒ Object (readonly)
Returns the value of attribute assets.
234 235 236 |
# File 'lib/hadupils/extensions.rb', line 234 def assets @assets end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
234 235 236 |
# File 'lib/hadupils/extensions.rb', line 234 def path @path end |
Class Method Details
Instance Method Details
#hadoop_confs ⇒ Object
249 250 251 |
# File 'lib/hadupils/extensions.rb', line 249 def hadoop_confs [] end |
#hivercs ⇒ Object
253 254 255 |
# File 'lib/hadupils/extensions.rb', line 253 def hivercs [] end |
#merge_assets(assets) ⇒ Object
244 245 246 247 |
# File 'lib/hadupils/extensions.rb', line 244 def merge_assets(assets) return @assets_block.call(assets) if @assets_block assets end |