Class: NodeRenderingContext
- Inherits:
-
Object
- Object
- NodeRenderingContext
show all
- Defined in:
- lib/hiptest-publisher/options_parser.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of NodeRenderingContext.
352
353
354
355
|
# File 'lib/hiptest-publisher/options_parser.rb', line 352
def initialize(properties)
@properties = OpenStruct.new(properties)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
357
358
359
|
# File 'lib/hiptest-publisher/options_parser.rb', line 357
def method_missing(name, *)
@properties[name]
end
|
Instance Method Details
#[](key) ⇒ Object
365
366
367
|
# File 'lib/hiptest-publisher/options_parser.rb', line 365
def [](key)
@properties[key]
end
|
#filename ⇒ Object
373
374
375
|
# File 'lib/hiptest-publisher/options_parser.rb', line 373
def filename
File.basename(@properties.path)
end
|
#folder ⇒ Object
377
378
379
|
# File 'lib/hiptest-publisher/options_parser.rb', line 377
def folder
File.dirname(@properties.path)
end
|
#has_key?(key) ⇒ Boolean
369
370
371
|
# File 'lib/hiptest-publisher/options_parser.rb', line 369
def has_key?(key)
@properties.respond_to?(key)
end
|
#node ⇒ Object
361
362
363
|
# File 'lib/hiptest-publisher/options_parser.rb', line 361
def node
@properties.node
end
|
#relative_folder ⇒ Object
381
382
383
|
# File 'lib/hiptest-publisher/options_parser.rb', line 381
def relative_folder
File.dirname(@properties.relative_path)
end
|
#renderer_addons ⇒ Object
385
386
387
388
389
390
391
|
# File 'lib/hiptest-publisher/options_parser.rb', line 385
def renderer_addons
addons = @properties.renderer_addons || ""
addons.split.map do |addon_name|
Hiptest.const_get(addon_name)
end
end
|