Module: ActiveResourceExtensions::ResourceWithSchema::ClassMethods

Defined in:
lib/active_resource_extensions/resource_with_schema.rb

Instance Method Summary collapse

Instance Method Details

#attribute_type(name) ⇒ Object



16
17
18
# File 'lib/active_resource_extensions/resource_with_schema.rb', line 16

def attribute_type name
  schema[name.to_s]
end

#is_attribute?(name) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/active_resource_extensions/resource_with_schema.rb', line 12

def is_attribute? name
  schema.keys.include? name.to_s
end

#schemaObject



20
21
22
# File 'lib/active_resource_extensions/resource_with_schema.rb', line 20

def schema
  @schema ||= remote_schema
end