class AzaharaSchema::Output

Attributes

schema[R]

Public Class Methods

key() click to toggle source
# File lib/azahara_schema/output.rb, line 6
def self.key
  self.name.split('::').last.sub(/Output$/, '').underscore
end
new(schema) click to toggle source
# File lib/azahara_schema/output.rb, line 14
def initialize(schema)
  @schema = schema
end

Public Instance Methods

formatter(template) click to toggle source
# File lib/azahara_schema/output.rb, line 35
def formatter(template)
  template.attribute_formatter_for(schema)
end
key() click to toggle source
# File lib/azahara_schema/output.rb, line 10
def key
  self.class.key
end
model() click to toggle source
# File lib/azahara_schema/output.rb, line 18
def model
  @schema.model
end
model_i18n_key() click to toggle source
# File lib/azahara_schema/output.rb, line 26
def model_i18n_key
  model_name.i18n_key
end
model_name() click to toggle source
# File lib/azahara_schema/output.rb, line 22
def model_name
  model.model_name
end
to_partial_path() click to toggle source

rendering

# File lib/azahara_schema/output.rb, line 31
def to_partial_path
  'azahara_schema/outputs/'+key
end