Sha256: 421f4167b7b3f89e893fcff3c24ef9df0d2d2e55cfd64ed56ff5957441983397
Contents?: true
Size: 1.56 KB
Versions: 9
Compression:
Stored size: 1.56 KB
Contents
calculation { # The application has support for an electricity calculation. :electricity is the internal label used to refer to it label :electricity name "Electricity Consumption" path '/business/energy/electricity/grid' drill { fixed 'argentina' #Not to be unset, value pre-given label :country #Name will default to label.humanize if not given path 'country' #Some of the fields on the form are drill-downs, but the application doesn't need to display these differently #type :autocompleting_text_box #default for a drill with entries is probably a dropdown } profile { label :energy_used # Symbol provided here is used in generating html ids for elements etc path 'energyPerTime' #The amee profile item value corresponding to the field name "Energy Used" #The display name used on the form unit "kWh" #Default unit choice interface :text_box #Probably not needed, as likely to be the default for profile item value unsets validation lambda{|x|x.is_a? Float} #Probably not needed, as default can be deduced from PIV TYPE in API. Here as illustrative. alternative_units :MWh, :MBTU, :BTU # If these are explcitly specified then the alternatives are limited to only these units. Otherwise all dimensionally equivalent units are available as alternatives by default } # Alternatively, the drill might be fixed #permanent :country { # drill_path 'country' # value 'Argentina' output { #A marv output value label :co2 path 'default' #It's not a marv, use the default output name "Carbon Dioxide" } }
Version data entries
9 entries across 7 versions & 1 rubygems