Class: Bricolage::Parameters
- Inherits:
-
Object
- Object
- Bricolage::Parameters
- Defined in:
- lib/bricolage/parameters.rb
Defined Under Namespace
Classes: CommandLineOptionHandler, Declarations, DefaultValuesHandler, DirectValueHandler, IntermediateValues
Instance Attribute Summary collapse
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Instance Method Summary collapse
- #[](key) ⇒ Object (also: #get)
-
#file_ds ⇒ Object
FIXME: remove.
-
#generic_ds ⇒ Object
FIXME: remove.
-
#initialize(decls, values, vars, ctx) ⇒ Parameters
constructor
class Parameters Materialized, fixed job parameter values.
- #inspect ⇒ Object
- #keys ⇒ Object
-
#ruby_ds ⇒ Object
FIXME: remove.
Constructor Details
#initialize(decls, values, vars, ctx) ⇒ Parameters
class Parameters Materialized, fixed job parameter values.
219 220 221 222 223 224 |
# File 'lib/bricolage/parameters.rb', line 219 def initialize(decls, values, vars, ctx) @decls = decls # Declarations @values = values # {name => a} @variables = vars # ResolvedVariables @context = ctx # Context end |
Instance Attribute Details
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
241 242 243 |
# File 'lib/bricolage/parameters.rb', line 241 def variables @variables end |
Instance Method Details
#[](key) ⇒ Object Also known as: get
230 231 232 233 |
# File 'lib/bricolage/parameters.rb', line 230 def [](key) raise ParameterError, "no such parameter: #{key}" unless @values.key?(key) @values[key] end |
#file_ds ⇒ Object
FIXME: remove
249 250 251 |
# File 'lib/bricolage/parameters.rb', line 249 def file_ds @context.get_data_source('file', 'file') end |
#generic_ds ⇒ Object
FIXME: remove
244 245 246 |
# File 'lib/bricolage/parameters.rb', line 244 def generic_ds @context.get_data_source('generic', 'generic') end |
#inspect ⇒ Object
226 227 228 |
# File 'lib/bricolage/parameters.rb', line 226 def inspect "\#<#{self.class} #{@values.inspect}>" end |
#keys ⇒ Object
237 238 239 |
# File 'lib/bricolage/parameters.rb', line 237 def keys @values.keys end |
#ruby_ds ⇒ Object
FIXME: remove
254 255 256 |
# File 'lib/bricolage/parameters.rb', line 254 def ruby_ds @context.get_data_source('ruby', 'ruby') end |